{"openapi":"3.1.0","info":{"title":"Revenium Platform API","description":"Revenium Platform API","contact":{"name":"Revenium","url":"https://revenium.io","email":"info@revenium.io"},"version":"2.19.0"},"externalDocs":{"description":"Revenium Platform Documentation","url":"https://docs.revenium.io"},"servers":[{"url":"https://api.revenium.ai/profitstream","description":"Revenium Platform API (Production)"}],"security":[{"x-api-key":[]}],"tags":[{"name":"Credentials","description":"Credential Operations"},{"name":"Organizations","description":"Organization Operations"},{"name":"AI Models","description":"AI Model Operations"},{"name":"Tenant Join Requests","description":"Tenant-admin management of domain-join requests"},{"name":"AI Audio Metrics","description":"AI Audio Metric Operations"},{"name":"Sessions","description":"Coding-Assistant Session Attribution Operations"},{"name":"Tools","description":"Tool Registry Operations"},{"name":"Workspaces","description":"Workspace management operations"},{"name":"Sources","description":"Source Operations"},{"name":"Invoice","description":"Invoice Operations"},{"name":"Teams","description":"Team Operations"},{"name":"Billing Analytics","description":"Billing Analytics for Dashboard Operations"},{"name":"Users","description":"User Operations"},{"name":"AI Traces","description":"AI Trace Metric Operations - Aggregated metrics grouped by traceId"},{"name":"Refund","description":"Refund Operations"},{"name":"AI Metrics","description":"Unified AI Metric Operations"},{"name":"AI Model Pricing","description":"Multi-modal AI Model Pricing Operations"},{"name":"Enforcement Rules","description":"Compiled enforcement rule operations"},{"name":"Tool Event Metrics","description":"Tool Event Log Operations"},{"name":"Tenants","description":"Tenant Operations"},{"name":"Subscribers","description":"Subscriber Operations"},{"name":"Github User Mapping","description":"Manual overrides for OTLP user_email to Github login mapping"},{"name":"Jobs","description":"Job Operations - Query agentic workflow execution instances"},{"name":"Coding Assistant","description":"Coding Assistant Subscription and Subscriber Operations"},{"name":"Skills","description":"Claude Code skill usage attribution — per-skill cost and call rollups for a team"},{"name":"Gitlab User Mapping","description":"Manual overrides for OTLP user_email to GitLab username mapping"},{"name":"AI Anomaly","description":"AI Anomaly Operations"},{"name":"User Cost Attribution","description":"Per-user cost attribution from provider billing data"},{"name":"Org Units","description":"Manage the org-unit tree (surfaced in the UI as \"Department\" / \"Org Unit\"), including CSV bulk import"},{"name":"AI Image Metrics","description":"AI Image Metric Operations"},{"name":"Agents","description":"Agent registry operations"},{"name":"Directory Mappings","description":"Manual overrides for subscriber-email to DirectoryPerson mapping (directory sync)"},{"name":"Period Charges","description":"Period Charge Operations"},{"name":"Cost Controls","description":"Cost Control CRUD operations for cost enforcement"},{"name":"Chart Builder","description":"Chart Builder Operations"},{"name":"Signup","description":"Anonymous signup decision endpoints for the domain-join flow"},{"name":"AI Anomaly Progress","description":"AI Anomaly Progress Operations (cumulative-usage progress, portfolio, bulk progress)"},{"name":"Squads","description":"Squad Operations - Aggregated metrics for multi-agent workflows grouped by squadId"},{"name":"Metering Element Definitions","description":"Metering Element Definition Operations"},{"name":"Enforcement Events","description":"Read-only access to enforcement violation events (shadow + enforced). Events are produced by the transaction-engine consumer of the enforcement violations Kafka topic and stored on the internal audit trail; this controller surfaces them for UI display. Create/update/delete are not supported — events are immutable audit records."},{"name":"AI Alert","description":"AI Alert Operations"},{"name":"Provider Charts","description":"Provider billing chart data for the Chart Builder and providers dashboard"},{"name":"AI Completion Metrics","description":"AI Completion Metric Operations"},{"name":"Subscriptions","description":"Subscription Operations"},{"name":"Chart Definitions","description":"Chart Definition Operations"},{"name":"AI Video Metrics","description":"AI Video Metric Operations"},{"name":"Products","description":"Product Operations"},{"name":"Integration Credentials","description":"Manage credentials for non-AI integrations (Github, Linear, etc.)"}],"paths":{"/v2/api/users/{id}":{"get":{"tags":["Users"],"summary":"Get a user by ID","description":"Get a user by its unique identifier","operationId":"get_user","parameters":[{"name":"id","in":"path","description":"Unique identifier of the user to retrieve. This is the Revenium-generated hashid returned when the user was created, visible in the user list endpoint, and used in all user-related API operations. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Returns a User object.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResource"},"examples":{"User by ID":{"description":"User by ID","value":{"id":"br7rP0K","resourceType":"user","label":"user@example.com","created":"2025-10-13T19:09:08.410Z","updated":"2025-10-16T01:45:46.586Z","email":"user@example.com","firstName":"Jason","lastName":"Cumberland","roles":["ROLE_TENANT_ADMIN"],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"teams":[{"id":"XPozX1E","resourceType":"team","label":"Example Team Name"}],"_links":{"self":{"href":"/profitstream/v2/api/users/br7rP0K"}}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/UserResource"},"examples":{"User by ID":{"description":"User by ID","value":{"id":"br7rP0K","resourceType":"user","label":"user@example.com","created":"2025-10-13T19:09:08.410Z","updated":"2025-10-16T01:45:46.586Z","email":"user@example.com","firstName":"Jason","lastName":"Cumberland","roles":["ROLE_TENANT_ADMIN"],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"teams":[{"id":"XPozX1E","resourceType":"team","label":"Example Team Name"}],"_links":{"self":{"href":"/profitstream/v2/api/users/br7rP0K"}}}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"User not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"tags":["Users"],"summary":"Update a User","description":"Update a new user.","operationId":"update_user","parameters":[{"name":"id","in":"path","description":"Unique identifier of the user to update. This is the Revenium-generated hashid returned when the user was created, visible in the user list endpoint, and used in all user-related API operations. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResource_Write"}}},"required":true},"responses":{"200":{"description":"Returns the updated User object.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResource_Read"},"examples":{"User Updated":{"description":"User Updated","value":{"id":"br7r27X","resourceType":"user","label":"test.user@example.com","created":"2025-10-22T15:41:11.722Z","updated":"2025-10-22T15:41:26.895Z","email":"test.user@example.com","firstName":"Test","lastName":"User Updated","roles":["ROLE_TENANT_ADMIN"],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"teams":[{"id":"XPozX1E","resourceType":"team","label":"Example Team Name"}],"_links":{"self":{"href":"/profitstream/v2/api/users/br7r27X"}}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/UserResource_Read"},"examples":{"User Updated":{"description":"User Updated","value":{"id":"br7r27X","resourceType":"user","label":"test.user@example.com","created":"2025-10-22T15:41:11.722Z","updated":"2025-10-22T15:41:26.895Z","email":"test.user@example.com","firstName":"Test","lastName":"User Updated","roles":["ROLE_TENANT_ADMIN"],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"teams":[{"id":"XPozX1E","resourceType":"team","label":"Example Team Name"}],"_links":{"self":{"href":"/profitstream/v2/api/users/br7r27X"}}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict - Resource conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Users"],"summary":"Delete a User","description":"Deletes a user","operationId":"delete_user","parameters":[{"name":"id","in":"path","description":"Unique identifier of the user to delete. This is the Revenium-generated hashid returned when the user was created, visible in the user list endpoint, and used in all user-related API operations. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"204":{"description":"User successfully deleted","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse_Read"},"examples":{"Delete User Response":{"description":"Delete User Response","value":{"message":"User with ID 1kOkq4P has been successfully deleted.","id":"1kOkq4P","resourceType":"user","created":"2025-10-22T16:57:43.007Z","updated":"2025-10-22T16:57:49.908Z"}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found - Organization does not exist","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/tools/{id}":{"get":{"tags":["Tools"],"summary":"Get a Tool","description":"Retrieves a tool by its unique identifier","operationId":"get_tool","parameters":[{"name":"id","in":"path","description":"Tool ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Tool retrieved successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityModelToolResource_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/EntityModelToolResource_Read"}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"Tool not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"tags":["Tools"],"summary":"Update a Tool","description":"Updates an existing tool configuration","operationId":"update_tool","parameters":[{"name":"id","in":"path","description":"Tool ID","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Updated tool configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResource"},"examples":{"Basic Tool Update":{"summary":"Rename a tool","description":"Update the tool's display name and description","value":{"teamId":"XPozNrw","toolId":"vector-db-query","name":"Vector DB Query v2","description":"Updated vector database query tool","toolType":"CUSTOM","toolProvider":"internal","enabled":true}}}}},"required":true},"responses":{"200":{"description":"Tool updated successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityModelToolResource_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/EntityModelToolResource_Read"}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"Tool not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Tool with toolId already exists","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Tools"],"summary":"Delete a Tool","description":"Deletes a tool by its unique identifier","operationId":"delete_tool","parameters":[{"name":"id","in":"path","description":"Tool ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Tool deleted successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityModelDeleteResponse"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/EntityModelDeleteResponse"}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"Tool not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/tenants/{id}/payment-methods/{paymentMethodId}/default":{"put":{"tags":["Tenants"],"summary":"Set default payment method for a tenant","description":"Sets the specified payment method as the default for the tenant","operationId":"setDefaultPaymentMethod","parameters":[{"name":"id","in":"path","description":"Unique identifier of the tenant. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"paymentMethodId","in":"path","description":"The payment method ID to set as default","required":true,"schema":{"type":"string"},"example":"pm_1234567890"}],"responses":{"204":{"description":"Payment method successfully set as default","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}}},"400":{"description":"No user ID found in billing profile or invalid payment method","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Tenant not found or no billing profile","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Failed to set default payment method","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/teams/{id}":{"get":{"tags":["Teams"],"summary":"Get a Team by ID","description":"Get an team by its unique identifier.","operationId":"get_team","parameters":[{"name":"id","in":"path","description":"Unique identifier of the team. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"The Team","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResource"},"examples":{"Team by ID":{"description":"Team by ID","value":{"id":"XPozX1E","resourceType":"team","label":"Example Team Name","created":"2025-10-13T19:09:08.240Z","updated":"2025-10-13T19:09:20.069Z","name":"user@example.com","currency":"USD","metadata":"","domainAliases":[],"types":["MANAGING"],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant","created":"2025-10-13T19:09:08.234Z","updated":"2025-10-16T19:03:11.216Z"},"sourceAutoDiscoveryEnabled":true,"elementDefinitionAutoDiscoveryEnabled":true,"aiDataIngested":true,"callCountElementDefinition":{"id":"gj7MqgK","resourceType":"undefined","label":"undefined","created":"10/13/25, 7:09 PM"},"useV2InvoiceDataLoading":false}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/TeamResource"},"examples":{"Team by ID":{"description":"Team by ID","value":{"id":"XPozX1E","resourceType":"team","label":"Example Team Name","created":"2025-10-13T19:09:08.240Z","updated":"2025-10-13T19:09:20.069Z","name":"user@example.com","currency":"USD","metadata":"","domainAliases":[],"types":["MANAGING"],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant","created":"2025-10-13T19:09:08.234Z","updated":"2025-10-16T19:03:11.216Z"},"sourceAutoDiscoveryEnabled":true,"elementDefinitionAutoDiscoveryEnabled":true,"aiDataIngested":true,"callCountElementDefinition":{"id":"gj7MqgK","resourceType":"undefined","label":"undefined","created":"10/13/25, 7:09 PM"},"useV2InvoiceDataLoading":false}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"tags":["Teams"],"summary":"Update a Team","description":"Update a team.","operationId":"update_team","parameters":[{"name":"id","in":"path","description":"Unique identifier of the team. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"description":"Updated team configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResource"},"examples":{"Basic Team Update":{"summary":"Rename a team","description":"Update the team name; omitted optional fields are left unchanged","value":{"name":"Engineering Team Renamed","tenantId":"Ag8nd4k"}}}}},"required":true},"responses":{"200":{"description":"Team updated successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResource_Read"},"examples":{"Team Updated":{"description":"Team Updated","value":{"id":"XPozNrw","resourceType":"team","label":"Acme Corporation Updated v2","created":"2025-10-17T22:24:15.233Z","updated":"2025-10-22T19:09:57.613Z","name":"Acme Corporation Updated v2","emailAddress":"updated2@acme.com","billingPhoneNumber":"555-555-5555","currency":"USD","types":[],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"sourceAutoDiscoveryEnabled":false,"elementDefinitionAutoDiscoveryEnabled":false,"aiDataIngested":true,"_links":{"self":{"href":"/profitstream/v2/api/organizations/XPozNrw"},"tenant":{"href":"/profitstream/v2/api/tenants/Ag8nd4k"}}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/TeamResource_Read"},"examples":{"Team Updated":{"description":"Team Updated","value":{"id":"XPozNrw","resourceType":"team","label":"Acme Corporation Updated v2","created":"2025-10-17T22:24:15.233Z","updated":"2025-10-22T19:09:57.613Z","name":"Acme Corporation Updated v2","emailAddress":"updated2@acme.com","billingPhoneNumber":"555-555-5555","currency":"USD","types":[],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"sourceAutoDiscoveryEnabled":false,"elementDefinitionAutoDiscoveryEnabled":false,"aiDataIngested":true,"_links":{"self":{"href":"/profitstream/v2/api/organizations/XPozNrw"},"tenant":{"href":"/profitstream/v2/api/tenants/Ag8nd4k"}}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"delete":{"tags":["Teams"],"summary":"Delete a Team","description":"Deletes an team","operationId":"delete_team","parameters":[{"name":"id","in":"path","description":"Unique identifier of the team. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Team successfully deleted","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"},"examples":{"Team Deleted":{"description":"Team Deleted","value":{"message":"Team with ID XPozNrw has been successfully deleted.","id":"XPozNrw","resourceType":"team","created":"2025-10-17T22:24:15.233Z","updated":"2025-10-22T19:10:36.594Z"}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"},"examples":{"Team Deleted":{"description":"Team Deleted","value":{"message":"Team with ID XPozNrw has been successfully deleted.","id":"XPozNrw","resourceType":"team","created":"2025-10-17T22:24:15.233Z","updated":"2025-10-22T19:10:36.594Z"}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/teams/{id}/settings/prompts":{"get":{"tags":["Teams"],"summary":"Get Team Prompt Settings","description":"Retrieve prompt capture settings for a team. The systemMaxPromptLength is a read-only system-wide constant that applies to all teams.","operationId":"get_team_prompt_settings","parameters":[{"name":"id","in":"path","description":"Unique identifier of the team. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Prompt settings retrieved successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptSettingsResource"},"examples":{"Prompt Settings":{"description":"Prompt Settings","value":{"promptCaptureEnabled":true,"systemMaxPromptLength":50000}}}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"tags":["Teams"],"summary":"Update Team Prompt Settings","description":"Update prompt capture settings for a team. Admin-only access. Note: systemMaxPromptLength is read-only and cannot be changed.","operationId":"update_team_prompt_settings","parameters":[{"name":"id","in":"path","description":"Unique identifier of the team. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptSettingsResource"}}},"required":true},"responses":{"200":{"description":"Prompt settings updated successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptSettingsResource"},"examples":{"Updated Prompt Settings":{"description":"Updated Prompt Settings","value":{"promptCaptureEnabled":true,"systemMaxPromptLength":50000}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/teams/{id}/settings/marketplaces":{"get":{"tags":["Teams"],"summary":"Get team internal-marketplace settings","description":"Get the set of Claude Code plugin marketplaces this team treats as internal (company-owned). Plugin-sourced skills from these marketplaces classify as ORGANIZATION rather than THIRD_PARTY.","operationId":"getTeamMarketplaceSettings","parameters":[{"name":"id","in":"path","description":"Unique identifier of the team. Format: Revenium hashid.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Internal-marketplace settings retrieved.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceSettingsResource_Read"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"put":{"tags":["Teams"],"summary":"Update team internal-marketplace settings","description":"Set the Claude Code plugin marketplaces this team treats as internal (company-owned). Re-classifies existing plugin-sourced skills between ORGANIZATION and THIRD_PARTY to match the new settings. Requires team-management permissions.","operationId":"updateTeamMarketplaceSettings","parameters":[{"name":"id","in":"path","description":"Unique identifier of the team. Format: Revenium hashid.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceSettingsResource_Write"}}},"required":true},"responses":{"200":{"description":"Internal-marketplace settings updated.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceSettingsResource_Read"}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict - Settings changed concurrently","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"422":{"description":"Validation failed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/teams/{id}/settings/coding-assistant-filter":{"get":{"tags":["Teams"],"summary":"Get team coding assistant billing model settings","description":"Retrieve which coding assistant providers are billed at real API rates for a team.","operationId":"get_team_coding_assistant_filter_settings","parameters":[{"name":"id","in":"path","description":"Team ID. Format: Revenium hashid.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Coding assistant billing model settings retrieved successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodingAssistantFilterSettingsResource"}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions or feature disabled","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"tags":["Teams"],"summary":"Update team coding assistant billing model settings","description":"Update which coding assistant providers are billed at real API rates for a team. Requires team-management permissions.","operationId":"update_team_coding_assistant_filter_settings","parameters":[{"name":"id","in":"path","description":"Team ID. Format: Revenium hashid.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodingAssistantFilterSettingsResource"}}},"required":true},"responses":{"200":{"description":"Coding assistant billing model settings updated successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodingAssistantFilterSettingsResource"}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions or feature disabled","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/subscriptions/{id}":{"get":{"tags":["Subscriptions"],"summary":"Get a Subscription by ID","description":"Get a subscription by its unique identifier","operationId":"get_subscription","parameters":[{"name":"id","in":"path","description":"Unique identifier of the subscription to retrieve. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"The subscription","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResource"},"examples":{"Subscription Response":{"description":"Subscription Response","value":{"id":"3Byg8GA","resourceType":"subscription","label":"unclassified@revenium.io","subscriberEmail":"unclassified@revenium.io","clientEmailAddress":"unclassified@revenium.io","created":"2025-10-16T19:03:14.219Z","name":"Auto discovered subscription for credential: ANONYMOUS","owner":{"id":"78R8Abk","resourceType":"user","label":"unclassified@revenium.io"},"client":{"id":"78R8Abk","resourceType":"user","label":"unclassified@revenium.io"},"organization":{"id":"QOjwW1Z","resourceType":"organization","label":"UNCLASSIFIED"},"product":{"id":"3BygBBL","resourceType":"product","label":"Default AI Product"},"credentials":[],"quotaNotificationThreshold":0,"notificationAddressesOnCreation":[],"notificationAddressesOnQuotaThreshold":[],"charge":0,"wentOverSubscriptionQuota":false,"tags":[],"allowImmediateCancellation":false,"periodCallCountConsumed":0}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SubscriptionResource"},"examples":{"Subscription Response":{"description":"Subscription Response","value":{"id":"3Byg8GA","resourceType":"subscription","label":"unclassified@revenium.io","subscriberEmail":"unclassified@revenium.io","clientEmailAddress":"unclassified@revenium.io","created":"2025-10-16T19:03:14.219Z","name":"Auto discovered subscription for credential: ANONYMOUS","owner":{"id":"78R8Abk","resourceType":"user","label":"unclassified@revenium.io"},"client":{"id":"78R8Abk","resourceType":"user","label":"unclassified@revenium.io"},"organization":{"id":"QOjwW1Z","resourceType":"organization","label":"UNCLASSIFIED"},"product":{"id":"3BygBBL","resourceType":"product","label":"Default AI Product"},"credentials":[],"quotaNotificationThreshold":0,"notificationAddressesOnCreation":[],"notificationAddressesOnQuotaThreshold":[],"charge":0,"wentOverSubscriptionQuota":false,"tags":[],"allowImmediateCancellation":false,"periodCallCountConsumed":0}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Subscription not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"tags":["Subscriptions"],"summary":"Update a Subscription","description":"Update a subscription","operationId":"update_subscription","parameters":[{"name":"id","in":"path","description":"Unique identifier of the subscription to update. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResource_Write"}}},"required":true},"responses":{"200":{"description":"The subscription","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResource"},"examples":{"Subscription Updated":{"description":"Subscription Updated","value":{"id":"3BygyB6","resourceType":"subscription","label":"test@example.com","subscriberEmail":"test@example.com","clientEmailAddress":"test@example.com","created":"2025-10-22T20:24:54.391Z","updated":"2025-10-22T20:25:04.597Z","name":"Updated Test Subscription","owner":{"id":"br7rP0K","resourceType":"user","label":"user@example.com"},"client":{"id":"br7r28g","resourceType":"user","label":"test@example.com"},"organization":{"id":"QOjwW1Z","resourceType":"organization","label":"UNCLASSIFIED"},"product":{"id":"3BygBBL","resourceType":"product","label":"Default AI Product"},"credentials":[],"charge":0,"wentOverSubscriptionQuota":false,"tags":[]}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SubscriptionResource"},"examples":{"Subscription Updated":{"description":"Subscription Updated","value":{"id":"3BygyB6","resourceType":"subscription","label":"test@example.com","subscriberEmail":"test@example.com","clientEmailAddress":"test@example.com","created":"2025-10-22T20:24:54.391Z","updated":"2025-10-22T20:25:04.597Z","name":"Updated Test Subscription","owner":{"id":"br7rP0K","resourceType":"user","label":"user@example.com"},"client":{"id":"br7r28g","resourceType":"user","label":"test@example.com"},"organization":{"id":"QOjwW1Z","resourceType":"organization","label":"UNCLASSIFIED"},"product":{"id":"3BygBBL","resourceType":"product","label":"Default AI Product"},"credentials":[],"charge":0,"wentOverSubscriptionQuota":false,"tags":[]}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Subscription not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Subscriptions"],"summary":"Delete a Subscription","description":"Delete a subscription","operationId":"delete_subscription","parameters":[{"name":"id","in":"path","description":"Unique identifier of the subscription to delete. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"The subscription","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"},"examples":{"Subscription Deleted":{"description":"Subscription Deleted","value":{"message":"Subscription with ID 3BygyB6 has been successfully deleted.","id":"3BygyB6","resourceType":"subscription","created":"2025-10-22T20:24:54.391Z","updated":"2025-10-22T20:25:20.935Z"}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"},"examples":{"Subscription Deleted":{"description":"Subscription Deleted","value":{"message":"Subscription with ID 3BygyB6 has been successfully deleted.","id":"3BygyB6","resourceType":"subscription","created":"2025-10-22T20:24:54.391Z","updated":"2025-10-22T20:25:20.935Z"}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Subscription not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["Subscriptions"],"summary":"Patch a Subscription","description":"Patch a subscription","operationId":"patch_subscription","parameters":[{"name":"id","in":"path","description":"Unique identifier of the subscription to patch. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPatchResource"}}},"required":true},"responses":{"200":{"description":"The subscription","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResource"},"examples":{"Subscription Patched":{"description":"Subscription Patched","value":{"id":"3BygyB6","resourceType":"subscription","label":"test@example.com","subscriberEmail":"test@example.com","clientEmailAddress":"test@example.com","created":"2025-10-22T20:24:54.391Z","updated":"2025-10-22T20:25:04.597Z","name":"Updated Test Subscription","owner":{"id":"br7rP0K","resourceType":"user","label":"user@example.com"},"client":{"id":"br7r28g","resourceType":"user","label":"test@example.com"},"organization":{"id":"QOjwW1Z","resourceType":"organization","label":"UNCLASSIFIED"},"product":{"id":"3BygBBL","resourceType":"product","label":"Default AI Product"},"credentials":[],"charge":0,"wentOverSubscriptionQuota":false,"tags":[]}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SubscriptionResource"},"examples":{"Subscription Patched":{"description":"Subscription Patched","value":{"id":"3BygyB6","resourceType":"subscription","label":"test@example.com","subscriberEmail":"test@example.com","clientEmailAddress":"test@example.com","created":"2025-10-22T20:24:54.391Z","updated":"2025-10-22T20:25:04.597Z","name":"Updated Test Subscription","owner":{"id":"br7rP0K","resourceType":"user","label":"user@example.com"},"client":{"id":"br7r28g","resourceType":"user","label":"test@example.com"},"organization":{"id":"QOjwW1Z","resourceType":"organization","label":"UNCLASSIFIED"},"product":{"id":"3BygBBL","resourceType":"product","label":"Default AI Product"},"credentials":[],"charge":0,"wentOverSubscriptionQuota":false,"tags":[]}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Subscription not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/subscribers/{id}":{"get":{"tags":["Subscribers"],"summary":"Get a subscriber by ID","description":"Get a subscriber by its unique identifier","operationId":"get_subscriber","parameters":[{"name":"id","in":"path","description":"Unique identifier of the subscriber to retrieve. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Returns a Subscriber object.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberResource"},"examples":{"Subscriber":{"description":"Subscriber","value":{"id":"br7r28g","resourceType":"user","label":"test@example.com","created":"2025-10-22T20:24:53.967Z","updated":"2025-10-22T20:24:55.333Z","email":"test@example.com","tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"organizations":[{"id":"QOjwW1Z","resourceType":"organization","label":"Example Team Name"}],"_links":{"self":{"href":"/profitstream/v2/api/users/br7r28g"}}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SubscriberResource"},"examples":{"Subscriber":{"description":"Subscriber","value":{"id":"br7r28g","resourceType":"user","label":"test@example.com","created":"2025-10-22T20:24:53.967Z","updated":"2025-10-22T20:24:55.333Z","email":"test@example.com","tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"organizations":[{"id":"QOjwW1Z","resourceType":"organization","label":"Example Team Name"}],"_links":{"self":{"href":"/profitstream/v2/api/users/br7r28g"}}}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Subscriber not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"tags":["Subscribers"],"summary":"Update a Subscriber","description":"Update a new subscriber.","operationId":"update_subscriber","parameters":[{"name":"id","in":"path","description":"Unique identifier of the subscriber to update. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberResource_Write"}}},"required":true},"responses":{"200":{"description":"Returns the updated subscriber object.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberResource_Read"},"examples":{"Updated Subscriber":{"description":"Updated Subscriber","value":{"id":"br7r28g","resourceType":"user","label":"test@example.com","created":"2025-10-22T20:24:53.967Z","updated":"2025-10-22T20:24:55.333Z","email":"test@example.com","tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"organizations":[{"id":"QOjwW1Z","resourceType":"organization","label":"Example Team Name"}],"_links":{"self":{"href":"/profitstream/v2/api/users/br7r28g"}}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SubscriberResource_Read"},"examples":{"Updated Subscriber":{"description":"Updated Subscriber","value":{"id":"br7r28g","resourceType":"user","label":"test@example.com","created":"2025-10-22T20:24:53.967Z","updated":"2025-10-22T20:24:55.333Z","email":"test@example.com","tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"organizations":[{"id":"QOjwW1Z","resourceType":"organization","label":"Example Team Name"}],"_links":{"self":{"href":"/profitstream/v2/api/users/br7r28g"}}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Subscriber not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict - Resource conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"delete":{"tags":["Subscribers"],"summary":"Delete a Subscriber","description":"Deletes a subscriber","operationId":"delete_subscriber","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a delete response.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/DeleteResponse_Read"}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Subscriber not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/sources/{id}":{"get":{"tags":["Sources"],"summary":"Get a Source by ID","description":"Get a source by its unique identifier","operationId":"get_source","parameters":[{"name":"id","in":"path","description":"Unique identifier of the source. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"The source","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceResource"},"examples":{"Source by ID":{"description":"Source by ID","value":{"id":"qx1yRL4","resourceType":"source","label":"Default","created":"2025-10-13T19:09:10.788Z","updated":"2025-10-13T19:09:16.506Z","name":"Default","description":"AI Default Source","version":"1.0.0","descriptionAsHTML":"<p>AI Default Source</p>\\n","type":"AI","syncedWithApiGateway":false,"autoDiscoveryEnabled":false,"sourceType":"UNKNOWN","tags":[],"sourceClassifications":[],"owner":{"id":"br7rP0K","resourceType":"user","label":"user@example.com","created":"2025-10-13T19:09:08.410Z","updated":"2025-10-22T19:24:21.339Z"},"team":{"id":"XPozX1E","resourceType":"team","label":"Example Team Name","created":"2025-10-13T19:09:08.240Z","updated":"2025-10-13T19:09:20.069Z"},"products":[{"id":"3BygBBL","resourceType":"product","label":"Default AI Product"}],"contracts":[],"meteringId":"Ag8nd4k:eb27437c-617c-4f9d-9104-985bdc3d86e7","metadata":""}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SourceResource"},"examples":{"Source by ID":{"description":"Source by ID","value":{"id":"qx1yRL4","resourceType":"source","label":"Default","created":"2025-10-13T19:09:10.788Z","updated":"2025-10-13T19:09:16.506Z","name":"Default","description":"AI Default Source","version":"1.0.0","descriptionAsHTML":"<p>AI Default Source</p>\\n","type":"AI","syncedWithApiGateway":false,"autoDiscoveryEnabled":false,"sourceType":"UNKNOWN","tags":[],"sourceClassifications":[],"owner":{"id":"br7rP0K","resourceType":"user","label":"user@example.com","created":"2025-10-13T19:09:08.410Z","updated":"2025-10-22T19:24:21.339Z"},"team":{"id":"XPozX1E","resourceType":"team","label":"Example Team Name","created":"2025-10-13T19:09:08.240Z","updated":"2025-10-13T19:09:20.069Z"},"products":[{"id":"3BygBBL","resourceType":"product","label":"Default AI Product"}],"contracts":[],"meteringId":"Ag8nd4k:eb27437c-617c-4f9d-9104-985bdc3d86e7","metadata":""}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Source not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"tags":["Sources"],"summary":"Update a Source","description":"Update a source.","operationId":"update_source","parameters":[{"name":"id","in":"path","description":"Unique identifier of the source. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceResource_Write"}}},"required":true},"responses":{"201":{"description":"Source updated successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceResource_Read"},"examples":{"Source Updated":{"description":"Source Updated","value":{"id":"QOjdPod","resourceType":"source","label":"Test Source Updated","created":"2025-10-22T19:31:25.309Z","updated":"2025-10-22T19:31:32.509Z","name":"Test Source Updated","description":"Test API Source Updated","version":"1.0.0","descriptionAsHTML":"<p>Test API Source Updated</p>\\n","type":"API","syncedWithApiGateway":false,"autoDiscoveryEnabled":false,"sourceType":"UNKNOWN","tags":[],"sourceClassifications":[],"owner":{"id":"br7rP0K","resourceType":"user","label":"user@example.com"},"team":{"id":"XPozX1E","resourceType":"team","label":"Example Team Name"},"products":[],"contracts":[],"meteringId":"Ag8nd4k:26d3a740-07a0-4233-8874-03f050623f7e","metadata":""}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Source not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Sources"],"summary":"Delete a Source","description":"Deletes a source","operationId":"delete_source","parameters":[{"name":"id","in":"path","description":"Unique identifier of the source. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Source successfully deleted","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"},"examples":{"Source Deleted":{"description":"Source Deleted","value":{"message":"Source with ID QOjdPod has been successfully deleted.","id":"QOjdPod","resourceType":"source","created":"2025-10-22T19:31:25.309Z","updated":"2025-10-22T19:31:39.315Z"}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"},"examples":{"Source Deleted":{"description":"Source Deleted","value":{"message":"Source with ID QOjdPod has been successfully deleted.","id":"QOjdPod","resourceType":"source","created":"2025-10-22T19:31:25.309Z","updated":"2025-10-22T19:31:39.315Z"}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Source not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/ai/models/{modelId}/pricing/dimensions":{"put":{"tags":["AI Model Pricing"],"summary":"Batch Save Pricing Dimensions","description":"Replace all pricing dimensions for an AI model with the provided list. Existing dimensions not in the list will be deleted.","operationId":"batch_save_pricing_dimensions","parameters":[{"name":"modelId","in":"path","description":"Unique identifier of the AI model","required":true,"schema":{"type":"string"}},{"name":"teamId","in":"query","description":"Team (organization) ID for tenant-specific pricing","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PricingDimensionResource_Read"}}}},"required":true},"responses":{"200":{"description":"Pricing dimensions saved successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PricingDimensionResource_Read"}}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"AI model not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["AI Model Pricing"],"summary":"Create Pricing Dimension","description":"Create a new pricing dimension for an AI model.","operationId":"create_pricing_dimension","parameters":[{"name":"modelId","in":"path","description":"Unique identifier of the AI model","required":true,"schema":{"type":"string"}},{"name":"teamId","in":"query","description":"Team (organization) ID for tenant-specific pricing","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingDimensionResource_Read"}}},"required":true},"responses":{"201":{"description":"Pricing dimension created successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingDimensionResource_Read"}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"AI model not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/ai/models/{modelId}/pricing/dimensions/{dimensionId}":{"put":{"tags":["AI Model Pricing"],"summary":"Update Pricing Dimension","description":"Update an existing pricing dimension.","operationId":"update_pricing_dimension","parameters":[{"name":"modelId","in":"path","description":"Unique identifier of the AI model","required":true,"schema":{"type":"string"}},{"name":"dimensionId","in":"path","description":"Unique identifier of the pricing dimension","required":true,"schema":{"type":"string"}},{"name":"teamId","in":"query","description":"Team (organization) ID for tenant-specific pricing","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingDimensionResource_Read"}}},"required":true},"responses":{"200":{"description":"Pricing dimension updated successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingDimensionResource_Read"}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"Pricing dimension not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["AI Model Pricing"],"summary":"Delete Pricing Dimension","description":"Delete a pricing dimension.","operationId":"delete_pricing_dimension","parameters":[{"name":"modelId","in":"path","description":"Unique identifier of the AI model","required":true,"schema":{"type":"string"}},{"name":"dimensionId","in":"path","description":"Unique identifier of the pricing dimension","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Pricing dimension deleted successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"Pricing dimension not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/ai/models/{id}":{"put":{"tags":["AI Models"],"summary":"Update an AI Model (Not Supported)","description":"**This endpoint is not supported.** Use PATCH /v2/api/sources/ai/models/{id}?teamId={teamId} for pricing updates on tenant-specific models.","operationId":"update_ai_model","parameters":[{"name":"id","in":"path","description":"Unique identifier of the AI model (not used - endpoint disabled)","required":true,"deprecated":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIModelResource"}}},"required":true},"responses":{"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method Not Allowed - PUT is not supported for AI model updates. Use PATCH /v2/api/sources/ai/models/{id}?teamId={teamId} for pricing updates on tenant-specific models.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"deprecated":true},"delete":{"tags":["AI Models"],"summary":"Delete an AI Model","description":"Delete an AI model by its unique identifier.","operationId":"delete_ai_model","parameters":[{"name":"id","in":"path","description":"Unique identifier of the AI model to delete. This is the Revenium-generated hashid returned when the model was created. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"The AI model was deleted successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"},"examples":{"Delete AI Model Response":{"description":"Delete AI Model Response","value":{"message":"AI model with ID 5oJ8en has been successfully deleted.","id":"5oJ8en","resourceType":"ai_model","created":"2025-10-23T18:24:26.151Z","updated":"2025-10-23T18:24:31.383Z"}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"},"examples":{"Delete AI Model Response":{"description":"Delete AI Model Response","value":{"message":"AI model with ID 5oJ8en has been successfully deleted.","id":"5oJ8en","resourceType":"ai_model","created":"2025-10-23T18:24:26.151Z","updated":"2025-10-23T18:24:31.383Z"}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"AI model not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["AI Models"],"summary":"Update AI Model Pricing","description":"Updates pricing fields on a tenant-specific AI model. Only non-null fields in the request will be updated. Global models cannot be modified - clone them first to create a tenant-specific version.","operationId":"patch_ai_model_pricing","parameters":[{"name":"id","in":"path","description":"Unique identifier of the AI model to update. Must be a tenant-specific model (not global).","required":true,"schema":{"type":"string"},"example":"5BAERR"},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization) that owns the model.","required":true,"schema":{"type":"string"},"example":"XPozX1E"}],"requestBody":{"description":"Pricing fields to update. Only non-null fields will be modified.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIModelPatchResource"},"examples":{"Full pricing update":{"description":"Full pricing update","value":{"inputCostPerToken":0.00005,"outputCostPerToken":0.0001,"cacheCreationCostPerInputToken":0.000025,"cacheReadCostPerInputToken":0.000005}},"Partial update (input cost only)":{"description":"Partial update (input cost only)","value":{"inputCostPerToken":0.00007}}}}},"required":true},"responses":{"200":{"description":"AI model pricing updated successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIModelResource_Read"},"examples":{"Updated AI Model":{"description":"Updated AI Model","value":{"id":"5BAERR","resourceType":"ai_model_metadata","label":"gpt-4","created":"2025-10-22T16:20:01.129Z","updated":"2025-10-23T10:15:30.456Z","name":"gpt-4","provider":"OPENAI","inputCostPerToken":0.00005,"outputCostPerToken":0.0001,"cacheCreationCostPerInputToken":0.000025,"cacheReadCostPerInputToken":0.000005,"mode":"chat","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"supportFunctionCalling":true,"supportsPromptCaching":true,"supportsSystemMessages":true,"supportsToolChoice":true,"_links":{"self":{"href":"/profitstream/v2/api/sources/ai/models/5BAERR"}}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AIModelResource_Read"}}}},"400":{"description":"Invalid request - negative pricing value or too many decimal places","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Cannot modify global model or user lacks permission","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"AI model or team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/sources/ai/anomaly/{id}":{"get":{"tags":["AI Anomaly"],"summary":"Get a AI Anomaly by ID","description":"Get an AI anomaly by its unique identifier.","operationId":"get_ai_anomaly","parameters":[{"name":"id","in":"path","description":"Unique identifier of the AI anomaly to retrieve. This is the Revenium-generated hashid returned when the anomaly was created. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Returns an AI Anomaly object.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAnomalyResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AIAnomalyResource"}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"AI Anomaly not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"tags":["AI Anomaly"],"summary":"Update a New AI Anomaly","description":"Updates a new AI Anomaly.","operationId":"update_ai_anomaly","parameters":[{"name":"id","in":"path","description":"Unique identifier of the AI anomaly to update. This is the Revenium-generated hashid returned when the anomaly was created. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAnomalyResource_Write"}}},"required":true},"responses":{"200":{"description":"AI Anomaly updated successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAnomalyResource_Read"}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["AI Anomaly"],"summary":"Delete an AI Anomaly","description":"Deletes an AI anomaly by its unique identifier.","operationId":"delete_ai_anomaly","parameters":[{"name":"id","in":"path","description":"Unique identifier of the AI anomaly to delete. This is the Revenium-generated hashid returned when the anomaly was created. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"AI Anomaly deleted successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/reports/chart-definitions/{id}":{"get":{"tags":["Chart Definitions"],"summary":"Get chart definition by ID","description":"Retrieve a specific saved chart configuration","operationId":"get_chart_definition","parameters":[{"name":"id","in":"path","description":"Chart definition identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Chart definition details","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartDefinitionResource_Read"},"examples":{"Chart Definition":{"description":"Chart Definition","value":{"id":"d5jKBD","resourceType":"chart_definition","label":"Average transaction counts by customer","created":"2025-10-17T18:37:42.821Z","updated":"2025-10-23T19:04:15.811Z","name":"Average transaction counts by customer","description":"Tracks average request counts per agent","configuration":{"mode":"aggregate","chartType":"column","dateRange":"7d","grain":"auto","primaryMetric":{"baseMetric":"requestCount","calculationType":"average","entityType":"agent"},"primaryGroupBy":"none","filters":[]},"team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"_links":{"self":{"href":"/profitstream/v2/api/reports/chart-definitions/d5jKBD"}}}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Chart definition not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"put":{"tags":["Chart Definitions"],"summary":"Update chart definition","description":"Update an existing chart configuration","operationId":"update_chart_definition","parameters":[{"name":"id","in":"path","description":"Chart definition identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartDefinitionResource_Write"}}},"required":true},"responses":{"200":{"description":"Chart definition updated successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartDefinitionResource_Read"},"examples":{"Updated Chart Definition":{"description":"Updated Chart Definition","value":{"id":"l396LD","resourceType":"chart_definition","label":"Total Cost by Provider - Updated","created":"2025-10-23T19:04:21.957Z","updated":"2025-10-23T19:04:32.352Z","name":"Total Cost by Provider - Updated","description":"Daily total cost aggregated by AI provider with 30-day view","configuration":{"mode":"aggregate","chartType":"line","dateRange":"30d","grain":"day","primaryMetric":{"baseMetric":"totalCost","calculationType":"total"},"primaryGroupBy":"provider","filters":[]},"team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"_links":{"self":{"href":"/profitstream/v2/api/reports/chart-definitions/l396LD"}}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Chart definition not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"delete":{"tags":["Chart Definitions"],"summary":"Delete chart definition","description":"Delete a saved chart configuration","operationId":"delete_chart_definition","parameters":[{"name":"id","in":"path","description":"Chart definition identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Chart definition deleted successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"},"examples":{"Deleted Chart Definition":{"description":"Deleted Chart Definition","value":{"message":"Chart definition with ID l396LD has been successfully deleted.","id":"l396LD","resourceType":"chart_definition","created":"2025-10-23T19:04:37.353Z","updated":"2025-10-23T19:04:37.352Z"}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Chart definition not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/products/{id}":{"get":{"tags":["Products"],"summary":"Get a Product by ID","description":"Get a product by its unique identifier.","operationId":"get_product","parameters":[{"name":"id","in":"path","description":"Unique identifier of the product to retrieve. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Product retrieved successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResource"},"examples":{"Basic Product Response":{"summary":"Simple product with basic subscription plan","description":"Response for a basic product with minimal configuration and a simple monthly subscription plan","value":{"id":"3BygBVb","resourceType":"product","label":"basic-api-product","created":"2025-10-17T20:13:39.686Z","updated":"2025-10-17T20:13:39.686Z","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"owner":{"id":"br7rP0K","resourceType":"user","label":"user@example.com"},"name":"basic-api-product","version":"1.0.0","description":"A basic API product for developers","plan":{"type":"SUBSCRIPTION","name":"Basic Monthly Plan","currency":"USD","period":"MONTH","periodCount":1,"charge":0,"graduated":false,"prePayAllFlatRates":false,"tiers":[{"id":"1372633702","name":"Base Tier","startingFrom":0,"unitAmount":29.99}],"elements":[],"setupFees":[],"ratingAggregations":[]},"published":false,"preview":false,"tags":[],"meteringModels":[],"notifyClientOnInvoice":true,"notificationAddressesOnInvoice":[],"subscriptionCount":0,"_links":{"self":{"href":"/profitstream/v2/api/products/3BygBVb"}}}},"Advanced Product Response":{"summary":"Advanced product response with all optional features","description":"Response for an advanced product showcasing portal publishing, notifications, tags, tiered pricing, and setup fees","value":{"id":"jM7BXYg","resourceType":"product","label":"premium-api-product-v3","created":"2025-10-17T20:35:14.636Z","updated":"2025-10-17T20:35:14.971Z","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"owner":{"id":"br7rP0K","resourceType":"user","label":"user@example.com"},"name":"premium-api-product-v3","version":"1.0.0","externalLabel":"Premium API Access","portalLabel":"Premium API - Enterprise Edition","portalId":"premium-api-v1","description":"Premium API product with advanced features and enterprise support","shortDescription":"Enterprise-grade API with tiered pricing","pricingDescription":"Pay-as-you-go pricing with volume discounts. Includes 14-day free trial.","published":true,"preview":false,"audienceRestriction":"USER","tags":["enterprise","api","premium","production"],"meteringModels":["TRANSACTIONAL","RESOURCE"],"notifyClientOnInvoice":true,"notificationAddressesOnInvoice":["billing@example.com","finance@example.com"],"notifyClientTrialAboutToExpire":true,"displayPriority":10,"comingSoon":false,"plan":{"type":"SUBSCRIPTION","name":"Premium Tiered Plan","currency":"USD","period":"MONTH","periodCount":1,"trialPeriod":"DAY","trialPeriodCount":14,"charge":0,"graduated":true,"prePayAllFlatRates":false,"tiers":[{"id":"1372633752","name":"Tier 1 - Starter","startingFrom":0,"upTo":10000,"unitAmount":0.01},{"id":"1372633753","name":"Tier 2 - Growth","startingFrom":10000,"upTo":50000,"unitAmount":0.008},{"id":"1372633754","name":"Tier 3 - Enterprise","startingFrom":50000,"unitAmount":0.005}],"elements":[],"setupFees":[{"id":"WP3PA9d","name":"Integration Support","type":"SUBSCRIPTION","flatAmount":250},{"id":"EN8NgbE","name":"Onboarding Fee","type":"ORGANIZATION","flatAmount":500}],"ratingAggregations":[]},"subscriptionCount":0,"_links":{"self":{"href":"/profitstream/v2/api/products/jM7BXYg"}}}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Product not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"tags":["Products"],"summary":"Update a Product","description":"Update a product by id. The version field will be automatically incremented by the API.","operationId":"update_product","parameters":[{"name":"id","in":"path","description":"Unique identifier of the product to update. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"description":"Updated product configuration. Only include fields you want to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResource"},"examples":{"Update Product Description":{"summary":"Update product descriptions and metadata","description":"Update product descriptions, tags, and display settings while keeping existing pricing","value":{"teamId":"XPozX1E","ownerId":"br7rP0K","name":"basic-api-product","version":"1.0.0","description":"Updated API product with enhanced features","shortDescription":"Enhanced API with new capabilities","tags":["enterprise","api","v2","enhanced"],"displayPriority":15,"plan":{"type":"SUBSCRIPTION","name":"Basic Monthly Plan","currency":"USD","period":"MONTH","periodCount":1,"tiers":[{"name":"Base Tier","unitAmount":29.99}]}}},"Update Product Pricing":{"summary":"Modify pricing tiers and add setup fee","description":"Update pricing structure by modifying tiers and adding a setup fee","value":{"teamId":"XPozX1E","ownerId":"br7rP0K","name":"premium-api-product-v3","version":"1.0.0","plan":{"type":"SUBSCRIPTION","name":"Updated Premium Plan","currency":"USD","period":"MONTH","periodCount":1,"trialPeriod":"DAY","trialPeriodCount":30,"tiers":[{"name":"Tier 1 - Starter","upTo":5000,"unitAmount":0.015},{"name":"Tier 2 - Professional","upTo":25000,"unitAmount":0.01},{"name":"Tier 3 - Enterprise","unitAmount":0.007}],"setupFees":[{"name":"Setup Fee","type":"SUBSCRIPTION","flatAmount":199}]}}},"Publish Product to Portal":{"summary":"Enable product in developer portal","description":"Publish product to developer portal with audience restrictions and notification settings","value":{"teamId":"XPozX1E","ownerId":"br7rP0K","name":"premium-api-product-v3","version":"1.0.0","published":true,"preview":false,"audienceRestriction":"USER","portalLabel":"Premium API - Production Ready","portalId":"premium-api-prod","notifyClientOnInvoice":true,"notificationAddressesOnInvoice":["billing@company.com"],"plan":{"type":"SUBSCRIPTION","name":"Premium Tiered Plan","currency":"USD","period":"MONTH","periodCount":1,"trialPeriod":"DAY","trialPeriodCount":14,"tiers":[{"name":"Tier 1 - Starter","upTo":10000,"unitAmount":0.01},{"name":"Tier 2 - Growth","upTo":50000,"unitAmount":0.008},{"name":"Tier 3 - Enterprise","unitAmount":0.005}],"setupFees":[{"name":"Onboarding Fee","type":"ORGANIZATION","flatAmount":500},{"name":"Integration Support","type":"SUBSCRIPTION","flatAmount":250}]}}}}}},"required":true},"responses":{"200":{"description":"Product updated successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResource"},"examples":{"Updated Product Response":{"summary":"Product after successful update","description":"Response showing the updated product with modified fields. IMPORTANT: The version is automatically incremented by the API (request sent with version 1.0.0, response returns version 2.0.0). You should send the current version in the request, and the API will increment it automatically.","value":{"id":"jM7BXYg","resourceType":"product","label":"premium-api-product-v3","created":"2025-10-17T20:35:14.636Z","updated":"2025-10-17T20:45:30.123Z","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"owner":{"id":"br7rP0K","resourceType":"user","label":"user@example.com"},"name":"premium-api-product-v3","version":"2.0.0","externalLabel":"Premium API Access","portalLabel":"Premium API - Production Ready","portalId":"premium-api-prod","description":"Updated API product with enhanced features","shortDescription":"Enhanced API with new capabilities","pricingDescription":"Pay-as-you-go pricing with volume discounts. Includes 30-day free trial.","published":true,"preview":false,"audienceRestriction":"USER","tags":["enterprise","api","v2","enhanced"],"meteringModels":["TRANSACTIONAL","RESOURCE"],"notifyClientOnInvoice":true,"notificationAddressesOnInvoice":["billing@company.com"],"notifyClientTrialAboutToExpire":true,"displayPriority":15,"comingSoon":false,"plan":{"type":"SUBSCRIPTION","name":"Updated Premium Plan","currency":"USD","period":"MONTH","periodCount":1,"trialPeriod":"DAY","trialPeriodCount":30,"charge":0,"graduated":true,"prePayAllFlatRates":false,"tiers":[{"id":"1372633755","name":"Tier 1 - Starter","startingFrom":0,"upTo":5000,"unitAmount":0.015},{"id":"1372633756","name":"Tier 2 - Professional","startingFrom":5000,"upTo":25000,"unitAmount":0.01},{"id":"1372633757","name":"Tier 3 - Enterprise","startingFrom":25000,"unitAmount":0.007}],"elements":[],"setupFees":[{"id":"XYZ123","name":"Setup Fee","type":"SUBSCRIPTION","flatAmount":199}],"ratingAggregations":[]},"subscriptionCount":0,"_links":{"self":{"href":"/profitstream/v2/api/products/jM7BXYg"}}}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Product not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Products"],"summary":"Delete a Product","description":"Delete a product by id","operationId":"delete_product","parameters":[{"name":"id","in":"path","description":"Unique identifier of the product to delete. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Product deleted successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"},"examples":{"Product Deleted":{"description":"Product Deleted","value":{"message":"Product with ID 3Byg4qK has been successfully deleted.","id":"3Byg4qK","resourceType":"product","created":"2025-10-22T20:39:20.358Z","updated":"2025-10-22T20:39:30.232Z"}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"},"examples":{"Product Deleted":{"description":"Product Deleted","value":{"message":"Product with ID 3Byg4qK has been successfully deleted.","id":"3Byg4qK","resourceType":"product","created":"2025-10-22T20:39:20.358Z","updated":"2025-10-22T20:39:30.232Z"}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Product not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/organizations/{id}":{"get":{"tags":["Organizations"],"summary":"Get an Organization by ID","description":"Get an organization by its unique identifier.","operationId":"get_organization","parameters":[{"name":"id","in":"path","description":"Unique identifier of the organization. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"The organization","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResource_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/OrganizationResource_Read"}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Organization not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"put":{"tags":["Organizations"],"summary":"Update an Organization","description":"Update an organization.","operationId":"update_organization","parameters":[{"name":"id","in":"path","description":"Unique identifier of the organization. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"description":"Organization update data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResource"},"examples":{"Update Contact Information":{"summary":"Update organization contact details","description":"Update email, phone, and billing information","value":{"name":"Acme Corporation Updated","tenantId":"Ag8nd4k","emailAddress":"updated@acme.com","phoneNumber":"555-555-5555"}},"Update Address Information":{"summary":"Update organization address","description":"Update full address and business details","value":{"name":"Acme Corporation","tenantId":"Ag8nd4k","address1":"1234 Main St","address2":"Suite 100","city":"Brooklyn","state":"NY","country":"USA","postalCode":"11201"}}}}},"required":true},"responses":{"200":{"description":"Organization updated successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResource_Read"},"examples":{"Updated Organization Response":{"summary":"Response after updating organization","description":"Organization with updated contact information","value":{"id":"XPozNrw","resourceType":"organization","label":"Acme Corporation Updated","created":"2025-10-17T22:24:15.233Z","updated":"2025-10-22T15:04:03.867Z","name":"Acme Corporation Updated","emailAddress":"updated@acme.com","phoneNumber":"555-555-5555","billingPhoneNumber":"555-555-5555","currency":"USD","types":[],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"_links":{"self":{"href":"/profitstream/v2/api/organizations/XPozNrw"},"tenant":{"href":"/profitstream/v2/api/tenants/Ag8nd4k"}}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Organization not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Organizations"],"summary":"Delete an organization","description":"Deletes an organization","operationId":"delete_organization","parameters":[{"name":"id","in":"path","description":"Unique identifier of the organization. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Organization successfully deleted","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"},"examples":{"Delete Organization Response":{"summary":"Successful deletion response","description":"Response confirming organization deletion","value":{"message":"Organization with ID QOjwp9J has been successfully deleted.","id":"QOjwp9J","resourceType":"organization","created":"2025-10-22T15:05:07.331Z","updated":"2025-10-22T15:05:12.362Z"}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found - Organization does not exist","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/org-units/persons/{personId}/assignment":{"get":{"tags":["Org Units"],"summary":"Get a person's primary org-unit assignment","description":"Returns the directory person's currently-open primary org-unit assignment.","operationId":"getPersonOrgUnit","parameters":[{"name":"personId","in":"path","description":"Directory person identifier","required":true,"schema":{"type":"integer","format":"int64"},"example":97}],"responses":{"200":{"description":"Current assignment returned","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrimaryAssignmentResponse_Read"}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Person not found in current organization, or person has no open assignment","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"put":{"tags":["Org Units"],"summary":"Set a person's primary org-unit assignment","description":"Assigns the directory person's primary org unit effective now, recorded as a MANUAL assignment (which the directory-sync mapping engine never overrides). Point-in-time history is preserved: prior usage stays attributed to the previous unit.","operationId":"assignPersonOrgUnit","parameters":[{"name":"teamId","in":"query","description":"Team (organization) identifier the person belongs to","required":true,"schema":{"type":"string"}},{"name":"personId","in":"path","description":"Directory person identifier","required":true,"schema":{"type":"integer","format":"int64"},"example":97}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignPrimaryRequest_Read"}}},"required":true},"responses":{"200":{"description":"Assignment set","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrimaryAssignmentResponse_Read"}}}},"400":{"description":"Invalid payload","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Person or org unit not found in current organization","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"A concurrent update to this person's assignment won the race — retry","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"delete":{"tags":["Org Units"],"summary":"Clear a person's primary org-unit assignment","description":"Closes the person's open primary assignment effective now. History is preserved (the closed row keeps its interval); returns 204 whether or not an open assignment existed.","operationId":"clearPersonOrgUnit","parameters":[{"name":"teamId","in":"query","description":"Team (organization) identifier the person belongs to","required":true,"schema":{"type":"string"}},{"name":"personId","in":"path","description":"Directory person identifier","required":true,"schema":{"type":"integer","format":"int64"},"example":97}],"responses":{"204":{"description":"Assignment cleared (or none was open)","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Person not found in current organization","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/org-units/assignments":{"put":{"tags":["Org Units"],"summary":"Set a primary org-unit assignment by subscriber email","description":"Resolves the email to a directory person (created when missing, source=manual) via the same deterministic bridge the CSV import uses, then assigns the primary org unit effective now as a MANUAL assignment. Serves the unassigned-subscribers flow, where a person may not exist yet.","operationId":"assignOrgUnitByEmail","parameters":[{"name":"teamId","in":"query","description":"Team (organization) identifier the assignment is made in","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignPrimaryByEmailRequest_Read"}}},"required":true},"responses":{"200":{"description":"Assignment set","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrimaryAssignmentResponse_Read"}}}},"400":{"description":"Invalid payload, ambiguous email match, or a manual unresolved override exists for the email","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Org unit not found in current organization","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"A concurrent update to this person's assignment won the race — retry","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/metering-element-definitions/{id}":{"get":{"tags":["Metering Element Definitions"],"summary":"Get a Metering Element Definition by ID","description":"Get a metering element definition by its unique identifier.","operationId":"get_metering_element_definition","parameters":[{"name":"id","in":"path","description":"Unique identifier of the metering element definition to retrieve. This is the Revenium-generated hashid returned when the definition was created. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"The metering element definition","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeteringElementDefinitionResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/MeteringElementDefinitionResource"}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Metering element definition not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"tags":["Metering Element Definitions"],"summary":"Update a Metering Element Definition","description":"Update a metering element definition for a specific team.","operationId":"update_metering_element_definition","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeteringElementDefinitionResource_Write"}}},"required":true},"responses":{"200":{"description":"Metering element definition updated successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeteringElementDefinitionResource_Read"}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Metering Element Definitions"],"summary":"Delete a Metering Element Definition","description":"Deletes a specific metering element definition by its ID","operationId":"delete_metering_element_definition","parameters":[{"name":"id","in":"path","description":"Unique identifier of the metering element definition to delete. Format: Revenium hashid (URL-safe).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Metering element definition successfully deleted","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/DeleteResponse_Read"}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found - Metering element definition with the given ID does not exist","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/credentials/{id}":{"get":{"tags":["Credentials"],"summary":"Get a Credential by ID","description":"Get a credential by its unique identifier.","operationId":"get_credential","parameters":[{"name":"id","in":"path","description":"Unique identifier of the credential to retrieve. This is the Revenium-generated hashid returned when the credential was created, visible in the credential list endpoint, and used in all credential-related API operations. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Returns a Credential object.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialResource"},"examples":{"Credential":{"description":"Credential","value":{"id":"3By4zQ6","resourceType":"credential","label":"Test Credential","created":"2025-10-23T19:06:34.745Z","name":"Test Credential","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"organization":{"id":"QOjwW1Z","resourceType":"organization","label":"UNCLASSIFIED"},"subscriber":{"id":"78R8Abk","resourceType":"user","label":"unclassified@revenium.io"},"externalId":"test-cred-001","externalSecret":"external-secret-value","subscriptions":[],"tags":[],"_links":{"self":{"href":"/profitstream/v2/api/credentials/3By4zQ6"}}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/CredentialResource"},"examples":{"Credential HAL":{"description":"Credential HAL","value":{"id":"3By4zQ6","resourceType":"credential","label":"Test Credential","created":"2025-10-23T19:06:34.745Z","name":"Test Credential","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"organization":{"id":"QOjwW1Z","resourceType":"organization","label":"UNCLASSIFIED"},"subscriber":{"id":"78R8Abk","resourceType":"user","label":"unclassified@revenium.io"},"externalId":"test-cred-001","externalSecret":"external-secret-value","subscriptions":[],"tags":[],"_links":{"self":{"href":"/profitstream/v2/api/credentials/3By4zQ6"}}}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Credential not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"tags":["Credentials"],"summary":"Update a Credential","description":"Update a credential","operationId":"update_credential","parameters":[{"name":"id","in":"path","description":"Unique identifier of the credential to update. This is the Revenium-generated hashid returned when the credential was created. The credential ID and API key cannot be changed, but other fields such as name and description can be updated. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialResource_Write"}}},"required":true},"responses":{"200":{"description":"Returns the updated Credential object.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialResource"},"examples":{"Updated Credential":{"description":"Updated Credential","value":{"id":"3By4zQ6","resourceType":"credential","label":"Test Credential Updated","created":"2025-10-23T19:06:34.745Z","updated":"2025-10-23T19:06:47.237Z","name":"Test Credential Updated","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"organization":{"id":"QOjwW1Z","resourceType":"organization","label":"UNCLASSIFIED"},"subscriber":{"id":"78R8Abk","resourceType":"user","label":"unclassified@revenium.io"},"externalId":"test-cred-001-updated","externalSecret":"external-secret-value-updated","subscriptions":[],"tags":[],"_links":{"self":{"href":"/profitstream/v2/api/credentials/3By4zQ6"}}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/CredentialResource"},"examples":{"Updated Credential":{"description":"Updated Credential","value":{"id":"3By4zQ6","resourceType":"credential","label":"Test Credential Updated","created":"2025-10-23T19:06:34.745Z","updated":"2025-10-23T19:06:47.237Z","name":"Test Credential Updated","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"organization":{"id":"QOjwW1Z","resourceType":"organization","label":"UNCLASSIFIED"},"subscriber":{"id":"78R8Abk","resourceType":"user","label":"unclassified@revenium.io"},"externalId":"test-cred-001-updated","externalSecret":"external-secret-value-updated","subscriptions":[],"tags":[],"_links":{"self":{"href":"/profitstream/v2/api/credentials/3By4zQ6"}}}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Credential not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Credentials"],"summary":"Delete a Credential","description":"Delete a credential","operationId":"delete_credential","parameters":[{"name":"id","in":"path","description":"Unique identifier of the credential to delete. This is the Revenium-generated hashid returned when the credential was created. Deleting a credential permanently removes it and its associated API key, which can no longer be used for authentication. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Returns a Delete Response object.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"},"examples":{"Deleted Credential":{"description":"Deleted Credential","value":{"message":"Credential with ID 3By4zQ6 has been successfully deleted.","id":"3By4zQ6","resourceType":"credential","created":"2025-10-23T19:06:34.745Z","updated":"2025-10-23T19:06:54.538Z"}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"},"examples":{"Deleted Credential":{"description":"Deleted Credential","value":{"message":"Credential with ID 3By4zQ6 has been successfully deleted.","id":"3By4zQ6","resourceType":"credential","created":"2025-10-23T19:06:34.745Z","updated":"2025-10-23T19:06:54.538Z"}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Credential not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/coding-assistant/subscription/{orgId}":{"get":{"tags":["Coding Assistant"],"summary":"Get coding assistant subscription","description":"Returns the coding assistant subscription configuration for the specified organization and provider.","operationId":"getCodingAssistantSubscription","parameters":[{"name":"orgId","in":"path","description":"Encoded organization ID","required":true,"schema":{"type":"string"},"example":"abc123"},{"name":"provider","in":"query","description":"Coding assistant provider (claude-code, claude-cowork, cursor-ide, gemini-cli, codex-cli, github-copilot)","required":true,"schema":{"type":"string"},"example":"claude-code"}],"responses":{"200":{"description":"Subscription retrieved successfully (returns defaults if not yet configured)","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityModelCodingAssistantSubscriptionResponse_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/EntityModelCodingAssistantSubscriptionResponse_Read"}}}},"400":{"description":"Invalid organization ID","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"put":{"tags":["Coding Assistant"],"summary":"Update coding assistant subscription","description":"Creates or updates the coding assistant subscription configuration for the specified organization.","operationId":"updateCodingAssistantSubscription","parameters":[{"name":"orgId","in":"path","description":"Encoded organization ID","required":true,"schema":{"type":"string"},"example":"abc123"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodingAssistantSubscriptionRequest_Read"}}},"required":true},"responses":{"200":{"description":"Subscription updated successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityModelCodingAssistantSubscriptionResponse_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/EntityModelCodingAssistantSubscriptionResponse_Read"}}}},"201":{"description":"Subscription created successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityModelCodingAssistantSubscriptionResponse_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/EntityModelCodingAssistantSubscriptionResponse_Read"}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Organization not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/agents/{id}":{"get":{"tags":["Agents"],"summary":"Get agent by ID","description":"Retrieve a specific registered agent","operationId":"get_agent","parameters":[{"name":"id","in":"path","description":"Agent identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Agent details","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResource_Read"},"examples":{"Agent":{"description":"Agent","value":{"id":"d5jKBD","resourceType":"agent","label":"Marketing Agent","created":"2026-07-01T18:37:42.821Z","updated":"2026-07-03T19:04:15.811Z","telemetryKey":"marketing-agent","displayName":"Marketing Agent","source":"API","owner":{"id":"l396LD","resourceType":"user","label":"jane.doe@example.com"},"team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"_links":{"self":{"href":"/profitstream/v2/api/agents/d5jKBD"}}}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Agent not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"put":{"tags":["Agents"],"summary":"Update agent","description":"Update an agent's display name or owner. Omitted fields are left unchanged; a set owner cannot be cleared. The telemetry key and team are immutable — rename/merge is not supported","operationId":"update_agent","parameters":[{"name":"id","in":"path","description":"Agent identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResource_Write"}}},"required":true},"responses":{"200":{"description":"Agent updated successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResource_Read"},"examples":{"Updated Agent":{"description":"Updated Agent","value":{"id":"d5jKBD","resourceType":"agent","label":"Marketing Agent (EU)","created":"2026-07-01T18:37:42.821Z","updated":"2026-07-10T19:04:32.352Z","telemetryKey":"marketing-agent","displayName":"Marketing Agent (EU)","source":"API","owner":{"id":"l396LD","resourceType":"user","label":"jane.doe@example.com"},"team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"_links":{"self":{"href":"/profitstream/v2/api/agents/d5jKBD"}}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Agent not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"delete":{"tags":["Agents"],"summary":"Delete agent","description":"Archive an agent registration. Telemetry referencing the agent's telemetry key is unaffected","operationId":"delete_agent","parameters":[{"name":"id","in":"path","description":"Agent identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Agent deleted successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"},"examples":{"Deleted Agent":{"description":"Deleted Agent","value":{"message":"Agent with ID d5jKBD has been successfully deleted.","id":"d5jKBD","resourceType":"agent","created":"2026-07-10T19:04:37.353Z","updated":"2026-07-10T19:04:37.352Z"}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Agent not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/users":{"get":{"tags":["Users"],"summary":"List Users","description":"Retrieve a paginated list of users.","operationId":"list_users","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization) to filter results. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Returns a paginated list of User objects.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPagedModel_Read"},"examples":{"Paginated Users List":{"description":"Paginated Users List","value":{"_embedded":{"userResourceList":[{"id":"br7rP0K","resourceType":"user","label":"user@example.com","created":"2025-10-13T19:09:08.410Z","updated":"2025-10-16T01:45:46.586Z","email":"user@example.com","firstName":"Jason","lastName":"Cumberland","roles":["ROLE_TENANT_ADMIN"],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"teams":[{"id":"XPozX1E","resourceType":"team","label":"Example Team Name"}],"_links":{"self":{"href":"/profitstream/v2/api/users/br7rP0K"}}}]},"page":{"size":2,"totalElements":2,"totalPages":1,"number":0}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/UserPagedModel_Read"},"examples":{"Paginated Users List":{"description":"Paginated Users List","value":{"_embedded":{"userResourceList":[{"id":"br7rP0K","resourceType":"user","label":"user@example.com","created":"2025-10-13T19:09:08.410Z","updated":"2025-10-16T01:45:46.586Z","email":"user@example.com","firstName":"Jason","lastName":"Cumberland","roles":["ROLE_TENANT_ADMIN"],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"teams":[{"id":"XPozX1E","resourceType":"team","label":"Example Team Name"}],"_links":{"self":{"href":"/profitstream/v2/api/users/br7rP0K"}}}]},"page":{"size":2,"totalElements":2,"totalPages":1,"number":0}}}}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - user is not authorized to view the organization's users","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Organization not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Users"],"summary":"Create a new User","description":"Creates a new user.","operationId":"create_user","requestBody":{"description":"User configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResource"},"examples":{"Basic User":{"summary":"Create a basic user","description":"Minimal user with required fields only","value":{"email":"test.user@example.com","firstName":"Test","lastName":"User","teamIds":["XPozX1E"],"roles":["ROLE_TENANT_ADMIN"]}}}}},"required":true},"responses":{"201":{"description":"User created successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResource_Read"},"examples":{"User Created":{"description":"User Created","value":{"id":"br7r27X","resourceType":"user","label":"test.user@example.com","created":"2025-10-22T15:41:11.722Z","updated":"2025-10-22T15:41:12.113Z","email":"test.user@example.com","firstName":"Test","lastName":"User","roles":["ROLE_TENANT_ADMIN"],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"teams":[{"id":"XPozX1E","resourceType":"team","label":"Example Team Name"}],"_links":{"self":{"href":"/profitstream/v2/api/users/br7r27X"}}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/UserResource_Read"},"examples":{"User Created":{"description":"User Created","value":{"id":"br7r27X","resourceType":"user","label":"test.user@example.com","created":"2025-10-22T15:41:11.722Z","updated":"2025-10-22T15:41:12.113Z","email":"test.user@example.com","firstName":"Test","lastName":"User","roles":["ROLE_TENANT_ADMIN"],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"teams":[{"id":"XPozX1E","resourceType":"team","label":"Example Team Name"}],"_links":{"self":{"href":"/profitstream/v2/api/users/br7r27X"}}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict - Resource conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/tools":{"get":{"tags":["Tools"],"summary":"List Tools","description":"Retrieves a paginated list of tools for a team","operationId":"list_tools","parameters":[{"name":"query","in":"query","description":"Search query (reserved for future use)","required":false,"schema":{"type":"string"}},{"name":"teamId","in":"query","description":"Team ID","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Tools retrieved successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedModelEntityModelToolResource_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelEntityModelToolResource_Read"}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Tools"],"summary":"Create a Tool","description":"Creates a new tool for non-token AI cost metering","operationId":"create_tool","requestBody":{"description":"Tool configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResource"},"examples":{"Basic Tool":{"summary":"Create a custom tool","description":"Custom tool registered for non-token AI cost metering","value":{"teamId":"XPozNrw","toolId":"vector-db-query","name":"Vector DB Query","description":"Vector database query tool for RAG pipelines","toolType":"CUSTOM","toolProvider":"internal","enabled":true}}}}},"required":true},"responses":{"201":{"description":"Tool created successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityModelToolResource_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/EntityModelToolResource_Read"}}}},"400":{"description":"Invalid input","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Tool with toolId already exists","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/tenants/{tenantId}/join-requests/{requestId}/deny":{"post":{"tags":["Tenant Join Requests"],"summary":"Deny a join request","description":"Denies a PENDING join request with neutral copy to the requester - never discloses who denied it. An optional internal resolutionNote may be recorded for admin context.","operationId":"deny_tenant_join_request","parameters":[{"name":"tenantId","in":"path","description":"Unique identifier of the tenant. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"requestId","in":"path","description":"Unique identifier of the join request. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"a91XJp"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DenyJoinRequestRequest"}}}},"responses":{"200":{"description":"Request denied","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantJoinRequestResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/TenantJoinRequestResource"}}}},"400":{"description":"Invalid resolutionNote","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Join request not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"This request has already been decided","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/tenants/{tenantId}/join-requests/{requestId}/approve":{"post":{"tags":["Tenant Join Requests"],"summary":"Approve a join request","description":"Approves a PENDING join request: creates the requester's User in this tenant's default team, granting the role chosen in the request body (defaults to the least-privilege ROLE_READ_ONLY when omitted).","operationId":"approve_tenant_join_request","parameters":[{"name":"tenantId","in":"path","description":"Unique identifier of the tenant. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"requestId","in":"path","description":"Unique identifier of the join request. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"a91XJp"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveJoinRequestRequest"}}}},"responses":{"200":{"description":"Request approved","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantJoinRequestResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/TenantJoinRequestResource"}}}},"400":{"description":"Invalid role requested","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Join request not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"This request has already been decided","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"This join request has expired","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/teams":{"get":{"tags":["Teams"],"summary":"List Teams","description":"Retrieve a paginated list of teams.","operationId":"list_teams","parameters":[{"name":"tenantId","in":"query","description":"Unique identifier of the tenant. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Paged list of teams","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationPagedModel_Read"},"examples":{"Teams List":{"description":"Teams List","value":{"_embedded":{"teamResourceList":[{"id":"XPozX1E","resourceType":"team","label":"Example Team Name","created":"2025-10-13T19:09:08.240Z","updated":"2025-10-13T19:09:20.069Z","name":"user@example.com","currency":"USD","types":["MANAGING"],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"sourceAutoDiscoveryEnabled":true,"elementDefinitionAutoDiscoveryEnabled":true,"aiDataIngested":true,"_links":{"self":{"href":"/profitstream/v2/api/organizations/XPozX1E"},"tenant":{"href":"/profitstream/v2/api/tenants/Ag8nd4k"}}}]},"page":{"size":20,"totalElements":1,"totalPages":1,"number":0}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/OrganizationPagedModel_Read"},"examples":{"Teams List":{"description":"Teams List","value":{"_embedded":{"teamResourceList":[{"id":"XPozX1E","resourceType":"team","label":"Example Team Name","created":"2025-10-13T19:09:08.240Z","updated":"2025-10-13T19:09:20.069Z","name":"user@example.com","currency":"USD","types":["MANAGING"],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"sourceAutoDiscoveryEnabled":true,"elementDefinitionAutoDiscoveryEnabled":true,"aiDataIngested":true,"_links":{"self":{"href":"/profitstream/v2/api/organizations/XPozX1E"},"tenant":{"href":"/profitstream/v2/api/tenants/Ag8nd4k"}}}]},"page":{"size":20,"totalElements":1,"totalPages":1,"number":0}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Tenant not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"post":{"tags":["Teams"],"summary":"Create a new Team","description":"Creates a new team.","operationId":"create_team","requestBody":{"description":"Team configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResource"},"examples":{"Basic Team":{"summary":"Create a basic managing team","description":"Minimal team with required fields only","value":{"name":"Engineering Team","tenantId":"Ag8nd4k","types":["MANAGING"]}}}}},"required":true},"responses":{"201":{"description":"Team created successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResource_Read"},"examples":{"Basic Team Created":{"description":"Basic Team Created","value":{"id":"br7rP0K","resourceType":"team","label":"New Team","created":"2025-10-22T19:10:00.000Z","updated":"2025-10-22T19:10:00.000Z","name":"New Team","currency":"USD","metadata":"","domainAliases":[],"types":["MANAGING"],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant","created":"2025-10-13T19:09:08.234Z","updated":"2025-10-16T19:03:11.216Z"},"sourceAutoDiscoveryEnabled":false,"elementDefinitionAutoDiscoveryEnabled":false,"aiDataIngested":false,"useV2InvoiceDataLoading":false}},"Complete Team Created":{"description":"Complete Team Created","value":{"id":"newTeamId","resourceType":"team","label":"Complete Team","created":"2025-10-22T19:10:00.000Z","updated":"2025-10-22T19:10:00.000Z","name":"Complete Team","externalId":"TEAM-001","emailAddress":"team@example.com","phoneNumber":"555-555-5555","billingPhoneNumber":"555-555-5556","currency":"USD","address1":"1234 Main St","address2":"Suite 100","city":"Brooklyn","state":"NY","country":"USA","postalCode":"11201","url":"https://www.example.com","metadata":"","domainAliases":[],"types":["MANAGING"],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant","created":"2025-10-13T19:09:08.234Z","updated":"2025-10-16T19:03:11.216Z"},"sourceAutoDiscoveryEnabled":true,"elementDefinitionAutoDiscoveryEnabled":true,"aiDataIngested":false}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/TeamResource_Read"},"examples":{"Basic Team Created":{"description":"Basic Team Created","value":{"id":"br7rP0K","resourceType":"team","label":"New Team","created":"2025-10-22T19:10:00.000Z","updated":"2025-10-22T19:10:00.000Z","name":"New Team","currency":"USD","metadata":"","domainAliases":[],"types":["MANAGING"],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant","created":"2025-10-13T19:09:08.234Z","updated":"2025-10-16T19:03:11.216Z"},"sourceAutoDiscoveryEnabled":false,"elementDefinitionAutoDiscoveryEnabled":false,"aiDataIngested":false,"useV2InvoiceDataLoading":false}},"Complete Team Created":{"description":"Complete Team Created","value":{"id":"newTeamId","resourceType":"team","label":"Complete Team","created":"2025-10-22T19:10:00.000Z","updated":"2025-10-22T19:10:00.000Z","name":"Complete Team","externalId":"TEAM-001","emailAddress":"team@example.com","phoneNumber":"555-555-5555","billingPhoneNumber":"555-555-5556","currency":"USD","address1":"1234 Main St","address2":"Suite 100","city":"Brooklyn","state":"NY","country":"USA","postalCode":"11201","url":"https://www.example.com","metadata":"","domainAliases":[],"types":["MANAGING"],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant","created":"2025-10-13T19:09:08.234Z","updated":"2025-10-16T19:03:11.216Z"},"sourceAutoDiscoveryEnabled":true,"elementDefinitionAutoDiscoveryEnabled":true,"aiDataIngested":false}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Tenant not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/subscriptions":{"get":{"tags":["Subscriptions"],"summary":"List Subscriptions","description":"List subscriptions","operationId":"list_subscriptions","parameters":[{"name":"query","in":"query","description":"The search query for name, client.username, client.emailAddress, organization.name or product.name","required":false,"schema":{"type":"string"}},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization) to filter results. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"The subscriptions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPagedModel"},"examples":{"Subscriptions List":{"description":"Subscriptions List","value":{"_embedded":{"subscriptionResourceList":[{"id":"3Byg8GA","resourceType":"subscription","label":"unclassified@revenium.io","subscriberEmail":"unclassified@revenium.io","clientEmailAddress":"unclassified@revenium.io","created":"2025-10-16T19:03:14.219Z","name":"Auto discovered subscription for credential: ANONYMOUS","owner":{"id":"78R8Abk","resourceType":"user","label":"unclassified@revenium.io"},"organization":{"id":"QOjwW1Z","resourceType":"organization","label":"UNCLASSIFIED"},"product":{"id":"3BygBBL","resourceType":"product","label":"Default AI Product"},"charge":0,"wentOverSubscriptionQuota":false,"tags":[]}]},"page":{"size":1,"totalElements":2,"totalPages":2,"number":0}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SubscriptionPagedModel"},"examples":{"Subscriptions List":{"description":"Subscriptions List","value":{"_embedded":{"subscriptionResourceList":[{"id":"3Byg8GA","resourceType":"subscription","label":"unclassified@revenium.io","subscriberEmail":"unclassified@revenium.io","clientEmailAddress":"unclassified@revenium.io","created":"2025-10-16T19:03:14.219Z","name":"Auto discovered subscription for credential: ANONYMOUS","owner":{"id":"78R8Abk","resourceType":"user","label":"unclassified@revenium.io"},"organization":{"id":"QOjwW1Z","resourceType":"organization","label":"UNCLASSIFIED"},"product":{"id":"3BygBBL","resourceType":"product","label":"Default AI Product"},"charge":0,"wentOverSubscriptionQuota":false,"tags":[]}]},"page":{"size":1,"totalElements":2,"totalPages":2,"number":0}}}}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Subscriptions"],"summary":"Create a new Subscription","description":"Creates a new subscription for a product. Note: The product must have at least one data source (asset) configured.","operationId":"create_subscription","requestBody":{"description":"Subscription configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResource"},"examples":{"Basic Subscription":{"summary":"Create a basic subscription","description":"Minimal subscription with required fields only","value":{"name":"basic-subscription","teamId":"XPozX1E","ownerId":"br7rP0K","subscriberEmail":"client@example.com","productId":"3BygBVb"}},"Advanced Subscription":{"summary":"Create subscription with all optional fields","description":"Comprehensive subscription with expiration, notifications, and quota settings","value":{"name":"premium-subscription","teamId":"XPozX1E","ownerId":"br7rP0K","subscriberEmail":"premium-client@example.com","productId":"jM7BXYg","organizationId":"XPozX1E","expiration":"2025-12-31T23:59:59Z","start":"2025-01-01T00:00:00Z","quotaNotificationThreshold":0.75,"notificationAddressesOnCreation":["admin@example.com"],"notificationAddressesOnQuotaThreshold":["ops@example.com","billing@example.com"]}}}}},"required":true},"responses":{"201":{"description":"Subscription created successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResource_Read"},"examples":{"Basic Subscription Response":{"summary":"Response for basic subscription creation","description":"Minimal subscription response with required fields","value":{"id":"abc123","resourceType":"subscription","label":"client@example.com","subscriberEmail":"client@example.com","clientEmailAddress":"client@example.com","created":"2025-10-17T21:00:00Z","updated":"2025-10-17T21:00:00Z","name":"basic-subscription","owner":{"id":"br7rP0K","resourceType":"user","label":"user@example.com"},"client":{"id":"xyz789","resourceType":"subscriber","label":"client@example.com"},"team":{"id":"XPozX1E","resourceType":"organization","label":"user@example.com"},"product":{"id":"3BygBVb","resourceType":"product","label":"basic-api-product"},"credentials":[],"isActive":true,"isValid":true,"_links":{"self":{"href":"/profitstream/v2/api/subscriptions/abc123"}}}},"Advanced Subscription Response":{"summary":"Response for advanced subscription with all optional fields","description":"Comprehensive subscription response including expiration, notifications, and quota settings","value":{"id":"def456","resourceType":"subscription","label":"premium-client@example.com","subscriberEmail":"premium-client@example.com","clientEmailAddress":"premium-client@example.com","created":"2025-10-17T21:00:00Z","updated":"2025-10-17T21:00:00Z","name":"premium-subscription","owner":{"id":"br7rP0K","resourceType":"user","label":"user@example.com"},"client":{"id":"uvw456","resourceType":"subscriber","label":"premium-client@example.com"},"organization":{"id":"XPozX1E","resourceType":"organization","label":"user@example.com"},"team":{"id":"XPozX1E","resourceType":"organization","label":"user@example.com"},"product":{"id":"jM7BXYg","resourceType":"product","label":"premium-api-product-v3"},"credentials":[],"expiration":"2025-12-31T23:59:59Z","start":"2025-01-01T00:00:00Z","quotaNotificationThreshold":0.75,"notificationAddressesOnCreation":["admin@example.com"],"notificationAddressesOnQuotaThreshold":["ops@example.com","billing@example.com"],"isActive":true,"isValid":true,"_links":{"self":{"href":"/profitstream/v2/api/subscriptions/def456"}}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/subscribers":{"get":{"tags":["Subscribers"],"summary":"List Subscribers","description":"Retrieve a paginated list of subscribers.","operationId":"list_subscribers","parameters":[{"name":"query","in":"query","description":"The search query for email, firstName or lastName","required":false,"schema":{"type":"string"}},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization) to filter by. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Returns a paginated list of Subscriber objects.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberPagedModel_Read"},"examples":{"Subscribers List":{"description":"Subscribers List","value":{"_embedded":{"subscriberResourceList":[{"id":"br7r28g","resourceType":"user","label":"test@example.com","created":"2025-10-22T20:24:53.967Z","updated":"2025-10-22T20:24:55.333Z","email":"test@example.com","tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"organizations":[{"id":"QOjwW1Z","resourceType":"organization","label":"Example Team Name"}],"_links":{"self":{"href":"/profitstream/v2/api/users/br7r28g"}}}]},"page":{"size":20,"totalElements":3,"totalPages":1,"number":0}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SubscriberPagedModel_Read"},"examples":{"Subscribers List":{"description":"Subscribers List","value":{"_embedded":{"subscriberResourceList":[{"id":"br7r28g","resourceType":"user","label":"test@example.com","created":"2025-10-22T20:24:53.967Z","updated":"2025-10-22T20:24:55.333Z","email":"test@example.com","tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"organizations":[{"id":"QOjwW1Z","resourceType":"organization","label":"Example Team Name"}],"_links":{"self":{"href":"/profitstream/v2/api/users/br7r28g"}}}]},"page":{"size":20,"totalElements":3,"totalPages":1,"number":0}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - subscriber is not authorized to view the organization's subscribers","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Organization not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"post":{"tags":["Subscribers"],"summary":"Create a new Subscriber","description":"Creates a new subscriber.","operationId":"create_subscriber","requestBody":{"description":"Subscriber configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberResource"},"examples":{"Basic Subscriber":{"summary":"Create a basic subscriber","description":"Minimal subscriber with required fields only","value":{"email":"client@acme.com","firstName":"Ada","lastName":"Lovelace","organizationIds":["XPozNrw"]}}}}},"required":true},"responses":{"201":{"description":"Returns the created subscriber object.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberResource_Read"},"examples":{"Created Subscriber":{"description":"Created Subscriber","value":{"id":"br7r28g","resourceType":"user","label":"test@example.com","created":"2025-10-22T20:24:53.967Z","updated":"2025-10-22T20:24:55.333Z","email":"test@example.com","tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"organizations":[{"id":"QOjwW1Z","resourceType":"organization","label":"Example Team Name"}],"_links":{"self":{"href":"/profitstream/v2/api/users/br7r28g"}}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SubscriberResource_Read"},"examples":{"Created Subscriber":{"description":"Created Subscriber","value":{"id":"br7r28g","resourceType":"user","label":"test@example.com","created":"2025-10-22T20:24:53.967Z","updated":"2025-10-22T20:24:55.333Z","email":"test@example.com","tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"organizations":[{"id":"QOjwW1Z","resourceType":"organization","label":"Example Team Name"}],"_links":{"self":{"href":"/profitstream/v2/api/users/br7r28g"}}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Subscriber not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict - Resource conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/sources":{"get":{"tags":["Sources"],"summary":"List Sources","description":"Retrieve a paginated list of sources.","operationId":"list_sources","parameters":[{"name":"query","in":"query","description":"Optional case-insensitive search. Matches sources whose name contains the value, whose externalId equals it, or whose owning organization's name contains it (the existing search semantics). Omit to list all sources for the team.","required":false,"schema":{"type":"string"},"example":"Default"},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Paged list of sources","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourcePagedModel_Read"},"examples":{"Sources List":{"description":"Sources List","value":{"_embedded":{"sourceResourceList":[{"id":"qx1yRL4","resourceType":"source","label":"Default","created":"2025-10-13T19:09:10.788Z","updated":"2025-10-13T19:09:16.506Z","name":"Default","description":"AI Default Source","version":"1.0.0","type":"AI","syncedWithApiGateway":false,"autoDiscoveryEnabled":false,"sourceType":"UNKNOWN","tags":[],"owner":{"id":"br7rP0K","resourceType":"user","label":"user@example.com"},"team":{"id":"XPozX1E","resourceType":"team","label":"Example Team Name"},"products":[{"id":"3BygBBL","resourceType":"product","label":"Default AI Product"}],"contracts":[],"_links":{"self":{"href":"/profitstream/v2/api/sources/qx1yRL4"},"team":{"href":"/profitstream/v2/api/teams/XPozX1E"},"owner":{"href":"/profitstream/v2/api/users/br7rP0K"}}}]},"page":{"size":20,"totalElements":1,"totalPages":1,"number":0}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SourcePagedModel_Read"},"examples":{"Sources List":{"description":"Sources List","value":{"_embedded":{"sourceResourceList":[{"id":"qx1yRL4","resourceType":"source","label":"Default","created":"2025-10-13T19:09:10.788Z","updated":"2025-10-13T19:09:16.506Z","name":"Default","description":"AI Default Source","version":"1.0.0","type":"AI","syncedWithApiGateway":false,"autoDiscoveryEnabled":false,"sourceType":"UNKNOWN","tags":[],"owner":{"id":"br7rP0K","resourceType":"user","label":"user@example.com"},"team":{"id":"XPozX1E","resourceType":"team","label":"Example Team Name"},"products":[{"id":"3BygBBL","resourceType":"product","label":"Default AI Product"}],"contracts":[],"_links":{"self":{"href":"/profitstream/v2/api/sources/qx1yRL4"},"team":{"href":"/profitstream/v2/api/teams/XPozX1E"},"owner":{"href":"/profitstream/v2/api/users/br7rP0K"}}}]},"page":{"size":20,"totalElements":1,"totalPages":1,"number":0}}}}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - user is not authorized to view the organization's sources","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Organization not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"post":{"tags":["Sources"],"summary":"Create a new Source","description":"Creates a new source.","operationId":"create_source","requestBody":{"description":"Source configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceResource"},"examples":{"Basic Source":{"summary":"Create a basic API source","description":"Minimal source with required fields only","value":{"name":"Payments API","version":"1.0","type":"API","ownerId":"br7rP0K","teamId":"XPozNrw"}}}}},"required":true},"responses":{"201":{"description":"Source created successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceResource_Read"},"examples":{"Source Created":{"description":"Source Created","value":{"id":"QOjdPod","resourceType":"source","label":"Test Source","created":"2025-10-22T19:31:25.309Z","updated":"2025-10-22T19:31:25.335Z","name":"Test Source","description":"Test API Source","version":"1.0.0","descriptionAsHTML":"<p>Test API Source</p>\\n","type":"API","syncedWithApiGateway":false,"autoDiscoveryEnabled":false,"sourceType":"UNKNOWN","tags":[],"sourceClassifications":[],"owner":{"id":"br7rP0K","resourceType":"user","label":"user@example.com"},"team":{"id":"XPozX1E","resourceType":"team","label":"Example Team Name"},"products":[],"contracts":[],"meteringId":"Ag8nd4k:26d3a740-07a0-4233-8874-03f050623f7e","metadata":""}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SourceResource_Read"},"examples":{"Source Created":{"description":"Source Created","value":{"id":"QOjdPod","resourceType":"source","label":"Test Source","created":"2025-10-22T19:31:25.309Z","updated":"2025-10-22T19:31:25.335Z","name":"Test Source","description":"Test API Source","version":"1.0.0","descriptionAsHTML":"<p>Test API Source</p>\\n","type":"API","syncedWithApiGateway":false,"autoDiscoveryEnabled":false,"sourceType":"UNKNOWN","tags":[],"sourceClassifications":[],"owner":{"id":"br7rP0K","resourceType":"user","label":"user@example.com"},"team":{"id":"XPozX1E","resourceType":"team","label":"Example Team Name"},"products":[],"contracts":[],"meteringId":"Ag8nd4k:26d3a740-07a0-4233-8874-03f050623f7e","metadata":""}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Source not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/sources/ai/models":{"get":{"tags":["AI Models"],"summary":"List AI Models","description":"Retrieve a paginated list of AI models.","operationId":"list_ai_models","parameters":[{"name":"query","in":"query","description":"The search query","required":false,"schema":{"type":"string"}},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization) to filter results. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"modelType","in":"query","description":"Filter models by type. GLOBAL returns only global models (available to all organizations), CUSTOM returns only custom models (organization-specific). If omitted, returns all models.","required":false,"schema":{"type":"string","enum":["GLOBAL","CUSTOM"]}},{"name":"provider","in":"query","description":"Filter models by provider (e.g., OPENAI, ANTHROPIC, GOOGLE). If omitted, returns models from all providers.","required":false,"schema":{"type":"string"},"example":"OPENAI"},{"name":"mode","in":"query","description":"Filter models by mode (e.g., chat, completion, embedding). If omitted, returns models with all modes.","required":false,"schema":{"type":"string"},"example":"chat"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"exactMatch","in":"query","description":"Match the complete model name case-insensitively instead of using substring search.","required":false,"schema":{"type":"boolean"},"example":true}],"responses":{"200":{"description":"Returns a paginated list of AI models.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIModelPagedModel_Read"},"examples":{"Paginated AI Models List":{"description":"Paginated AI Models List","value":{"_embedded":{"aIModelResourceList":[{"id":"l31YwN","resourceType":"ai_model_metadata","label":"gpt-4-turbo-test","created":"2025-10-23T18:22:48.987Z","name":"gpt-4-turbo-test","provider":"OPENAI","inputCostPerToken":0.00001,"outputCostPerToken":0.00003,"cacheCreationCostPerInputToken":0,"cacheReadCostPerInputToken":0,"mode":"chat","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"_links":{"self":{"href":"/profitstream/v2/api/sources/ai/models/l31YwN"}}}]},"page":{"size":2,"totalElements":1664,"totalPages":832,"number":0}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AIModelPagedModel_Read"},"examples":{"Paginated AI Models List":{"description":"Paginated AI Models List","value":{"_embedded":{"aIModelResourceList":[{"id":"l31YwN","resourceType":"ai_model_metadata","label":"gpt-4-turbo-test","created":"2025-10-23T18:22:48.987Z","name":"gpt-4-turbo-test","provider":"OPENAI","inputCostPerToken":0.00001,"outputCostPerToken":0.00003,"cacheCreationCostPerInputToken":0,"cacheReadCostPerInputToken":0,"mode":"chat","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"_links":{"self":{"href":"/profitstream/v2/api/sources/ai/models/l31YwN"}}}]},"page":{"size":2,"totalElements":1664,"totalPages":832,"number":0}}}}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - user is not authorized to view the organization's AI models","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Organization not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"post":{"tags":["AI Models"],"summary":"Create a New AI Model","description":"Creates a new AI model.","operationId":"create_ai_model","requestBody":{"description":"AI model configuration with per-token pricing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIModelResource"},"examples":{"Custom Chat Model":{"summary":"Register a custom chat model with token pricing","description":"Field examples mirror the resource schema (gpt-4-turbo / OPENAI / chat)","value":{"name":"gpt-4-turbo","provider":"OPENAI","inputCostPerToken":0.00001,"outputCostPerToken":0.00003,"mode":"chat","teamId":"XPozNrw"}}}}},"required":true},"responses":{"201":{"description":"AI Model created successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIModelResource_Read"},"examples":{"Basic AI Model":{"description":"Basic AI Model","value":{"id":"l31YwN","resourceType":"ai_model_metadata","label":"gpt-4-turbo-test","created":"2025-10-23T18:22:48.987Z","name":"gpt-4-turbo-test","provider":"OPENAI","inputCostPerToken":0.00001,"outputCostPerToken":0.00003,"cacheCreationCostPerInputToken":0,"cacheReadCostPerInputToken":0,"mode":"chat","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"_links":{"self":{"href":"/profitstream/v2/api/sources/ai/models/l31YwN"}}}},"Advanced AI Model with Capabilities":{"description":"Advanced AI Model with Capabilities","value":{"id":"5BAERR","resourceType":"ai_model_metadata","label":"gpt-4","created":"2025-10-22T16:20:01.129Z","name":"gpt-4","provider":"OPENAI","inputCostPerToken":0.00003,"outputCostPerToken":0.00006,"cacheCreationCostPerInputToken":0,"cacheReadCostPerInputToken":0,"mode":"chat","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"supportFunctionCalling":true,"supportsPromptCaching":true,"supportsSystemMessages":true,"supportsToolChoice":true,"_links":{"self":{"href":"/profitstream/v2/api/sources/ai/models/5BAERR"}}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AIModelResource_Read"},"examples":{"Basic AI Model":{"description":"Basic AI Model","value":{"id":"l31YwN","resourceType":"ai_model_metadata","label":"gpt-4-turbo-test","created":"2025-10-23T18:22:48.987Z","name":"gpt-4-turbo-test","provider":"OPENAI","inputCostPerToken":0.00001,"outputCostPerToken":0.00003,"cacheCreationCostPerInputToken":0,"cacheReadCostPerInputToken":0,"mode":"chat","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"_links":{"self":{"href":"/profitstream/v2/api/sources/ai/models/l31YwN"}}}},"Advanced AI Model with Capabilities":{"description":"Advanced AI Model with Capabilities","value":{"id":"5BAERR","resourceType":"ai_model_metadata","label":"gpt-4","created":"2025-10-22T16:20:01.129Z","name":"gpt-4","provider":"OPENAI","inputCostPerToken":0.00003,"outputCostPerToken":0.00006,"cacheCreationCostPerInputToken":0,"cacheReadCostPerInputToken":0,"mode":"chat","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"supportFunctionCalling":true,"supportsPromptCaching":true,"supportsSystemMessages":true,"supportsToolChoice":true,"_links":{"self":{"href":"/profitstream/v2/api/sources/ai/models/5BAERR"}}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict - Resource conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/sources/ai/models/{globalModelId}/clone":{"post":{"tags":["AI Models"],"summary":"Clone a Global AI Model","description":"Creates a tenant-specific copy of a global AI model with optional custom pricing. The cloned model will have all capability flags copied from the global model, and can have custom pricing overrides applied.","operationId":"clone_ai_model","parameters":[{"name":"globalModelId","in":"path","description":"Unique identifier of the global AI model to clone. Must be a global model (organization_id = null).","required":true,"schema":{"type":"string"},"example":"5BAERR"},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization) that will own the cloned model.","required":true,"schema":{"type":"string"},"example":"XPozX1E"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIModelPatchResource_Read"}}}},"responses":{"201":{"description":"Tenant-specific AI model created successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIModelResource_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AIModelResource_Read"}}}},"400":{"description":"Invalid input data - source model is not a global model","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User cannot manage the specified team","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Global model or team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict - Tenant-specific model with the same name already exists","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/sources/ai/anomaly":{"get":{"tags":["AI Anomaly"],"summary":"List AI Anomaly","description":"Retrieve a paginated list of AI Anomalies.","operationId":"list_ai_anomalies","parameters":[{"name":"query","in":"query","description":"Search query for filtering by anomaly name.","required":false,"schema":{"type":"string"}},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization) to filter results. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"type","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Paged list of AI anomalies","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAnomalyPagedModel_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AIAnomalyPagedModel_Read"}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - user is not authorized to view the organization's AI anomalies","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Organization not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["AI Anomaly"],"summary":"Create a New AI Anomaly","description":"Creates a new AI anomaly alert configuration for monitoring AI metrics and costs","operationId":"create_ai_anomaly","requestBody":{"description":"AI anomaly alert configuration. Supports threshold-based alerts, relative change detection, and cumulative usage tracking.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAnomalyResource"},"examples":{"Basic Threshold Alert":{"summary":"Simple cost threshold alert","description":"Monitors total AI costs and triggers when exceeding $100 in a 1-hour period","value":{"name":"High Cost Alert","teamId":"a91XJp","alertType":"THRESHOLD","metricType":"TOTAL_COST","operatorType":"GREATER_THAN","threshold":100,"periodDuration":"ONE_HOUR","enabled":true,"notificationAddresses":["admin@example.com"],"slackConfigurations":[],"filters":[]}},"Relative Change Alert":{"summary":"Token usage spike detection with model filter","description":"Triggers when token usage increases by 50% compared to previous period for GPT-4 model from OpenAI provider","value":{"name":"Token Usage Spike Alert","teamId":"a91XJp","alertType":"RELATIVE_CHANGE","metricType":"TOKEN_COUNT","operatorType":"GREATER_THAN","threshold":50,"isPercentage":true,"periodDuration":"ONE_HOUR","enabled":true,"notificationAddresses":["devops@example.com"],"slackConfigurations":[],"filters":[{"dimension":"MODEL","operator":"IS","value":"gpt-4"},{"dimension":"PROVIDER","operator":"IS","value":"OpenAI"}]}},"Cumulative Budget Alert":{"summary":"Daily AI spending budget with product filter","description":"Cumulative usage alert that tracks total daily spending and triggers when exceeding $500 for products containing 'api' in their name","value":{"name":"Daily Budget Alert","teamId":"a91XJp","alertType":"CUMULATIVE_USAGE","metricType":"TOTAL_COST","operatorType":"GREATER_THAN","threshold":500,"periodDuration":"DAILY","enabled":true,"notificationAddresses":["billing@example.com"],"slackConfigurations":[],"filters":[{"dimension":"PRODUCT","operator":"CONTAINS","value":"api"}]}}}}},"required":true},"responses":{"201":{"description":"AI Anomaly created successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAnomalyResource_Read"},"examples":{"Created Alert Response":{"summary":"Successfully created threshold alert","description":"Created Alert Response","value":{"id":"af75417c71d24e708f506596ce5ab675","resourceType":"ai_anomaly_metadata","label":"High Cost Alert","created":"2024-10-15T14:30:00Z","updated":"2024-10-15T14:30:00Z","createdBy":"user@example.com","modifiedBy":"user@example.com","name":"High Cost Alert","team":{"id":"a91XJp","label":"Engineering Team","resourceType":"team"},"alertType":"THRESHOLD","metricType":"TOTAL_COST","operatorType":"GREATER_THAN","threshold":100,"periodDuration":"ONE_HOUR","enabled":true,"firing":false,"notificationAddresses":["admin@example.com"],"slackConfigurations":[],"filters":[]}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AIAnomalyResource_Read"},"examples":{"Created Alert Response":{"summary":"Successfully created threshold alert","description":"Created Alert Response","value":{"id":"af75417c71d24e708f506596ce5ab675","resourceType":"ai_anomaly_metadata","label":"High Cost Alert","created":"2024-10-15T14:30:00Z","updated":"2024-10-15T14:30:00Z","createdBy":"user@example.com","modifiedBy":"user@example.com","name":"High Cost Alert","team":{"id":"a91XJp","label":"Engineering Team","resourceType":"team"},"alertType":"THRESHOLD","metricType":"TOTAL_COST","operatorType":"GREATER_THAN","threshold":100,"periodDuration":"ONE_HOUR","enabled":true,"firing":false,"notificationAddresses":["admin@example.com"],"slackConfigurations":[],"filters":[]}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Resource not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/signup/withdraw":{"post":{"tags":["Signup"],"summary":"Withdraw a PENDING join request","description":"Withdraws the caller's own PENDING join request. No notifications are sent.","operationId":"withdraw_signup_join_request","responses":{"200":{"description":"Request withdrawn","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupStatusResponse"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SignupStatusResponse"}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid Bearer token","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"No pending join request found for this email address","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/signup/proceed-solo":{"post":{"tags":["Signup"],"summary":"Proceed with solo provisioning instead of joining","description":"Records the caller's explicit choice to create their own workspace instead of joining, then provisions it synchronously. After this returns, the frontend re-authenticates normally.","operationId":"signup_proceed_solo","responses":{"202":{"description":"Solo provisioning accepted","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid Bearer token, or email not verified","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"This email address cannot be used to create a workspace","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Workspace provisioning failed; the request is safe to retry","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/signup/join-request":{"post":{"tags":["Signup"],"summary":"Request to join the workspace that owns the caller's verified email domain","description":"Creates (or idempotently returns) a PENDING join request and notifies the target workspace's admins.","operationId":"create_signup_join_request","responses":{"201":{"description":"Join request created (or already existed)","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupStatusResponse"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SignupStatusResponse"}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid Bearer token, or email not verified","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"This request has already been decided","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"No active workspace is available to join for this email address","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sessions/{sessionId}/attribution":{"post":{"tags":["Sessions"],"summary":"Attribute session to ticket","description":"Record a point-in-time attribution between a coding-assistant session and a ticket. A different ticket opens a new time interval; re-posting the same ticket as the current interval (without effectiveFrom) is a no-op. An explicit effectiveFrom is idempotent on (org, sessionId, effectiveFrom): it updates that interval in place (last-write-wins).","operationId":"attribute_session","parameters":[{"name":"sessionId","in":"path","description":"Opaque identifier for the coding-assistant session (e.g. Claude Code session UUID).","required":true,"schema":{"type":"string"},"example":"sess-abc123"},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"description":"Session → ticket attribution payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionAttributionRequest"},"examples":{"Basic attribution":{"summary":"Attribute a session to a ticket","description":"Basic attribution","value":{"ticketId":"BACK-1632"}},"Full attribution":{"summary":"Attribution with all optional fields","description":"Full attribution","value":{"ticketId":"BACK-1632","ticketTitle":"Add session attribution API","reason":"Starting implementation","source":"claude-code","subscriberEmail":"dev@example.com","repo":"revenium/hypercurrent","branch":"feature/BACK-1632","effectiveFrom":"2025-06-12T10:00:00Z"}},"Unlink ticket":{"summary":"Disassociate session from any ticket","description":"Unlink ticket","value":{"ticketId":"none"}}}}},"required":true},"responses":{"200":{"description":"Attribution recorded successfully.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionAttributionResource"}}}},"400":{"description":"Invalid request parameters or validation error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Team not found.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict - a concurrent write is recording the same (session, effectiveFrom) interval.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - semantic validation failure (e.g. malformed ticketId pattern).","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/reports/chart-definitions":{"get":{"tags":["Chart Definitions"],"summary":"List chart definitions","description":"List all saved chart definitions for the team","operationId":"list_chart_definitions","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"teamId","in":"query","description":"Team identifier","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["updated,DESC","id,DESC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Collection of chart definitions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartDefinitionPagedModel_Read"},"examples":{"Chart Definitions List":{"description":"Chart Definitions List","value":{"_embedded":{"chartDefinitionResourceList":[{"id":"d5jKBD","resourceType":"chart_definition","label":"Average transaction counts by customer","created":"2025-10-17T18:37:42.821Z","updated":"2025-10-23T19:04:15.811Z","name":"Average transaction counts by customer","description":"Tracks average request counts per agent","configuration":{"mode":"aggregate","chartType":"column","dateRange":"7d","grain":"auto","primaryMetric":{"baseMetric":"requestCount","calculationType":"average","entityType":"agent"},"primaryGroupBy":"none","filters":[]},"team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"_links":{"self":{"href":"/profitstream/v2/api/reports/chart-definitions/d5jKBD"}}}]},"page":{"size":20,"totalElements":1,"totalPages":1,"number":0}}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"post":{"tags":["Chart Definitions"],"summary":"Create chart definition","description":"Save a new chart configuration for reuse","operationId":"create_chart_definition","requestBody":{"description":"Chart definition with the chart configuration to persist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartDefinitionResource"},"examples":{"Cost by Customer":{"summary":"Save a 30-day cost-by-customer line chart","description":"Time-series totalCost chart grouped by customer","value":{"name":"Cost by Customer (30d)","teamId":"XPozNrw","configuration":{"mode":"time","chartType":"line","dateRange":"30d","grain":"day","primaryMetric":{"baseMetric":"totalCost","calculationType":"total"},"primaryGroupBy":"customer"}}}}}},"required":true},"responses":{"201":{"description":"Chart definition created successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartDefinitionResource_Read"},"examples":{"Created Chart Definition":{"description":"Created Chart Definition","value":{"id":"l396LD","resourceType":"chart_definition","label":"Total Cost by Provider","created":"2025-10-23T19:04:21.957Z","updated":"2025-10-23T19:04:21.957Z","name":"Total Cost by Provider","description":"Daily total cost aggregated by AI provider","configuration":{"mode":"aggregate","chartType":"line","dateRange":"30d","grain":"day","primaryMetric":{"baseMetric":"totalCost","calculationType":"total"},"primaryGroupBy":"provider","filters":[]},"team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"_links":{"self":{"href":"/profitstream/v2/api/reports/chart-definitions/l396LD"}}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/reports/chart-builder/generate":{"post":{"tags":["Chart Builder"],"summary":"Generate chart data","description":"Generate chart data based on the provided configuration. Executes queries against AI completion metrics and returns chart-ready data.","operationId":"generate_chart_data","parameters":[{"name":"teamId","in":"query","description":"Team identifier for scoping chart data","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Chart configuration to execute","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartConfigurationResource"},"examples":{"Cost by Customer":{"summary":"30-day time-series of total cost grouped by customer","description":"Cost by Customer","value":{"mode":"time","chartType":"line","dateRange":"30d","grain":"day","primaryMetric":{"baseMetric":"totalCost","calculationType":"total"},"primaryGroupBy":"customer"}}}}},"required":true},"responses":{"200":{"description":"Chart data generated successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartBuilderGenerateResponse"},"examples":{"Generated Chart Data":{"description":"Generated Chart Data","value":{"chartType":"line","title":"Total Cost by Model","xAxisLabel":"Date","yAxisLabel":"Cost (USD)","series":[{"name":"gpt-4","data":[{"x":"2025-10-01","y":125.5},{"x":"2025-10-02","y":142.3},{"x":"2025-10-03","y":118.75},{"x":"2025-10-04","y":156.2},{"x":"2025-10-05","y":134.9}]},{"name":"claude-3-opus","data":[{"x":"2025-10-01","y":89.25},{"x":"2025-10-02","y":95.6},{"x":"2025-10-03","y":102.4},{"x":"2025-10-04","y":87.15},{"x":"2025-10-05","y":110.3}]}],"summary":{"totalValue":1456.75,"averageValue":145.68,"minValue":87.15,"maxValue":156.2,"dataPoints":10}}}}}}},"400":{"description":"Invalid request - check configuration parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/products":{"get":{"tags":["Products"],"summary":"List Products","description":"List products","operationId":"list_products","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization) to filter results. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"type","in":"query","description":"Optional filter. When set to 'published' (case-insensitive), returns only published products; otherwise ignored.","required":false,"schema":{"type":"string"},"example":"published"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"The products","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductPagedModel"},"examples":{"Products List":{"description":"Products List","value":{"_embedded":{"productResourceList":[{"id":"3BygBBL","resourceType":"product","label":"Default AI Product","created":"2025-10-13T19:09:20.014Z","updated":"2025-10-13T19:09:20.072Z","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"owner":{"id":"br7rP0K","resourceType":"user","label":"user@example.com"},"name":"Default AI Product","version":"1.0.0","description":"Default AI Product","published":false,"preview":false,"tags":[],"meteringModels":[],"subscriptionCount":1,"_links":{"self":{"href":"/profitstream/v2/api/products/3BygBBL"}}},{"id":"jM7BMVN","resourceType":"product","label":"product-789","created":"2025-10-17T17:53:38.991Z","updated":"2025-10-17T17:53:39.132Z","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"owner":{"id":"br7rP0K","resourceType":"user","label":"user@example.com"},"name":"product-789","version":"1.0.0","description":"product-789","published":false,"preview":false,"tags":[],"meteringModels":[],"subscriptionCount":0,"_links":{"self":{"href":"/profitstream/v2/api/products/jM7BMVN"}}}]},"page":{"size":2,"totalElements":6,"totalPages":3,"number":0}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ProductPagedModel"},"examples":{"Products List":{"description":"Products List","value":{"_embedded":{"productResourceList":[{"id":"3BygBBL","resourceType":"product","label":"Default AI Product","created":"2025-10-13T19:09:20.014Z","updated":"2025-10-13T19:09:20.072Z","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"owner":{"id":"br7rP0K","resourceType":"user","label":"user@example.com"},"name":"Default AI Product","version":"1.0.0","description":"Default AI Product","published":false,"preview":false,"tags":[],"meteringModels":[],"subscriptionCount":1,"_links":{"self":{"href":"/profitstream/v2/api/products/3BygBBL"}}},{"id":"jM7BMVN","resourceType":"product","label":"product-789","created":"2025-10-17T17:53:38.991Z","updated":"2025-10-17T17:53:39.132Z","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"owner":{"id":"br7rP0K","resourceType":"user","label":"user@example.com"},"name":"product-789","version":"1.0.0","description":"product-789","published":false,"preview":false,"tags":[],"meteringModels":[],"subscriptionCount":0,"_links":{"self":{"href":"/profitstream/v2/api/products/jM7BMVN"}}}]},"page":{"size":2,"totalElements":6,"totalPages":3,"number":0}}}}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Products"],"summary":"Create a new Product","description":"Creates a new product.","operationId":"create_product","requestBody":{"description":"Product configuration including name, version, pricing plan, and optional metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResource"},"examples":{"Basic Product":{"summary":"Minimal product with simple subscription plan","description":"Basic product configuration with required fields and a simple monthly subscription plan","value":{"teamId":"XPozX1E","ownerId":"br7rP0K","name":"basic-api-product","version":"1.0.0","description":"A basic API product for developers","plan":{"type":"SUBSCRIPTION","name":"Basic Monthly Plan","currency":"USD","period":"MONTH","periodCount":1,"tiers":[{"name":"Base Tier","unitAmount":29.99}]}}},"Advanced Product":{"summary":"Complete product with all optional features","description":"Comprehensive product configuration showcasing portal publishing, notifications, tags, and advanced pricing","value":{"teamId":"XPozX1E","ownerId":"br7rP0K","name":"premium-api-product","version":"1.0.0","externalLabel":"Premium API Access","portalLabel":"Premium API - Enterprise Edition","portalId":"premium-api-v1","description":"Premium API product with advanced features and enterprise support","shortDescription":"Enterprise-grade API with tiered pricing","pricingDescription":"Pay-as-you-go pricing with volume discounts. Includes 14-day free trial.","published":true,"preview":false,"audienceRestriction":"USER","tags":["enterprise","api","premium","production"],"meteringModels":["TRANSACTIONAL","RESOURCE"],"notifyClientOnInvoice":true,"notificationAddressesOnInvoice":["billing@example.com","finance@example.com"],"notifyClientTrialAboutToExpire":true,"displayPriority":10,"comingSoon":false,"plan":{"type":"SUBSCRIPTION","name":"Premium Tiered Plan","currency":"USD","period":"MONTH","periodCount":1,"trialPeriod":"DAY","trialPeriodCount":14,"tiers":[{"name":"Tier 1 - Starter","upTo":10000,"unitAmount":0.01},{"name":"Tier 2 - Growth","upTo":50000,"unitAmount":0.008},{"name":"Tier 3 - Enterprise","unitAmount":0.005}],"setupFees":[{"name":"Onboarding Fee","type":"ORGANIZATION","flatAmount":500},{"name":"Integration Support","type":"SUBSCRIPTION","flatAmount":250}]}}}}}},"required":true},"responses":{"201":{"description":"Product created successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResource_Read"}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/organizations":{"get":{"tags":["Organizations"],"summary":"List Organizations","description":"Retrieve a paginated list of organizations within a tenant. Note on scope: Organizations are tenant-scoped (a tenant contains one or more teams; each team can reference organizations defined at the tenant level). For this reason, this endpoint requires tenantId, not the teamId used by team-scoped endpoints (jobs, subscriptions, products, etc.). Tenant and team identifiers are distinct and not interchangeable.","operationId":"list_organizations","parameters":[{"name":"query","in":"query","description":"The search query for name, id, externalId or parent.id","required":false,"schema":{"type":"string"}},{"name":"tenantId","in":"query","description":"Unique identifier of the tenant (the parent scope that contains teams). Distinct from teamId — passing a teamId here will return 404 Tenant not found. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Paged list of organizations","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationPagedModel_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/OrganizationPagedModel_Read"}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - user is not authorized to view the tenant","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Tenant not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Organizations"],"summary":"Create a new Organization","description":"Creates a new organization. tenantId is required in the request body to properly associate the organization with a tenant. parentId is optional: omit for top-level organizations; to create a nested organization, set parentId to an existing organization ID (retrieve with GET /v2/api/organizations?tenantId={tenantId}).","operationId":"create_organization","requestBody":{"description":"Organization configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResource"},"examples":{"Basic Organization":{"summary":"Create a basic organization","description":"Minimal organization with required fields only","value":{"name":"Acme Corporation","tenantId":"Ag8nd4k"}},"Complete Organization":{"summary":"Create organization with all optional fields","description":"Comprehensive organization with contact information, address, and business details","value":{"name":"Weyland-Yutani Corporation","tenantId":"Ag8nd4k","externalId":"WY-1234","emailAddress":"contact@weyland-yutani.com","phoneNumber":"555-555-5555","billingPhoneNumber":"555-555-5556","url":"https://www.weyland-yutani.com","currency":"USD","address1":"1234 Main St","address2":"Suite 100","city":"Brooklyn","state":"NY","country":"USA","postalCode":"11201","remittanceInstructions":"Please remit payment to the address above"}}}}},"required":true},"responses":{"201":{"description":"Organization created successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResource_Read"},"examples":{"Basic Organization Response":{"summary":"Response for basic organization creation","description":"Minimal organization response with required fields","value":{"id":"xyz123","resourceType":"organization","label":"Acme Corporation","created":"2025-10-17T22:00:00Z","updated":"2025-10-17T22:00:00Z","name":"Acme Corporation","types":["CONSUMER"],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Default Tenant"},"_links":{"self":{"href":"/profitstream/v2/api/organizations/xyz123"}}}},"Complete Organization Response":{"summary":"Response for complete organization with all fields","description":"Comprehensive organization response including contact information, address, and business details","value":{"id":"abc456","resourceType":"organization","label":"Weyland-Yutani Corporation","created":"2025-10-17T22:00:00Z","updated":"2025-10-17T22:00:00Z","name":"Weyland-Yutani Corporation","externalId":"WY-1234","emailAddress":"contact@weyland-yutani.com","phoneNumber":"555-555-5555","billingPhoneNumber":"555-555-5556","url":"https://www.weyland-yutani.com","currency":"USD","address1":"1234 Main St","address2":"Suite 100","city":"Brooklyn","state":"NY","country":"USA","postalCode":"11201","remittanceInstructions":"Please remit payment to the address above","types":["CONSUMER"],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Default Tenant"},"_links":{"self":{"href":"/profitstream/v2/api/organizations/abc456"}}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found - Referenced resource does not exist","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/org-units":{"get":{"tags":["Org Units"],"summary":"List org units","description":"Lists every active org unit for the current organization (id, name, parentId, path, source, externalRef). The frontend builds the tree from parentId/path.","operationId":"listOrgUnits","responses":{"200":{"description":"Org units returned","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrgUnitResponse_Read"}}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"post":{"tags":["Org Units"],"summary":"Create an org unit","description":"Creates a new org unit under the given parent (or as a root when parentId is omitted). Always created with source=MANUAL.","operationId":"createOrgUnit","parameters":[{"name":"teamId","in":"query","description":"Team (organization) identifier the unit is created in","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrgUnitRequest_Read"}}},"required":true},"responses":{"201":{"description":"Org unit created","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUnitResponse_Read"}}}},"400":{"description":"Invalid payload","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"parentId not found in current organization","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"An org unit with this name already exists under the parent","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"422":{"description":"Unprocessable entity","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/org-units/import/csv":{"post":{"tags":["Org Units"],"summary":"Bulk import org units and primary memberships from CSV","description":"Accepts multipart/form-data with a file field named 'file'. Header: email,org_unit_path[,is_primary]. org_unit_path is slash-separated unit names from root (e.g. Engineering/Platform/Payments); missing units are created. Emails resolve to directory people (created when missing, source=csv); no operational user is ever created. dryRun=true runs full validation with zero writes.","operationId":"importOrgUnitsCsv","parameters":[{"name":"teamId","in":"query","description":"Team (organization) identifier to import into","required":true,"schema":{"type":"string"}},{"name":"dryRun","in":"query","description":"When true, validates and reports without writing any data","required":false,"schema":{"type":"boolean","default":false},"example":false}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"200":{"description":"Import report","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CsvImportReport_Read"}}}},"400":{"description":"Invalid file or header","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"413":{"description":"File exceeds the maximum size of 5 MB","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"422":{"description":"File exceeds the maximum row count","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/metering-element-definitions":{"get":{"tags":["Metering Element Definitions"],"summary":"List Metering Element Definitions by Team","description":"Retrieve a paginated list of metering elements for a specified team.","operationId":"list_metering_elements","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization) to filter results. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"type","in":"query","required":false,"schema":{"type":"string"}},{"name":"sourceIds","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Paged list of metering element definitions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeteringElementDefinitionPagedModel_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/MeteringElementDefinitionPagedModel_Read"}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - user is not authorized to view the organization","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Organization not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Metering Element Definitions"],"summary":"Create a new Metering Element Definition","description":"Creates a new metering element definition for a specific team.","operationId":"create_metering_element_definition","requestBody":{"description":"Metering element definition configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeteringElementDefinitionResource"},"examples":{"Basic Element Definition":{"summary":"Define a STRING metering element","description":"Minimal definition with required fields only (name, type, teamId)","value":{"name":"country","description":"Country dimension extracted from usage metadata","type":"STRING","teamId":"XPozNrw"}}}}},"required":true},"responses":{"201":{"description":"Metering element definition created successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeteringElementDefinitionResource_Read"}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/jobs":{"get":{"tags":["Jobs"],"summary":"List Jobs","description":"Get paginated list of jobs. Jobs represent agentic workflow execution instances that group related AI operations.","operationId":"list_jobs","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"search","in":"query","description":"Search by agentic job ID or job name (case-insensitive partial match). Matches jobs where either agenticJobId or name contains the search term.","required":false,"schema":{"type":"string","description":"Search by agentic job ID or job name (case-insensitive partial match). Matches jobs where either agenticJobId or name contains the search term.","example":"loan","maxLength":256,"minLength":1},"example":"loan"},{"name":"type","in":"query","description":"Filter by job type (case-insensitive exact match).","required":false,"schema":{"type":"string","description":"Filter by job type (case-insensitive exact match).","example":"loan_processing"},"example":"loan_processing"},{"name":"executionStatus","in":"query","description":"Filter by execution status.","required":false,"schema":{"type":"string","description":"Filter by execution status.","enum":["SUCCESS","FAILED","CANCELLED"],"example":"SUCCESS"},"example":"SUCCESS"},{"name":"outcomeType","in":"query","description":"Filter by outcome type. PENDING is a virtual value that matches jobs with no outcome reported yet (outcomeType IS NULL). It is independent of executionStatus, so it can be combined with any executionStatus filter (e.g. executionStatus=SUCCESS with outcomeType=PENDING returns jobs that completed successfully but have no outcome reported yet).","required":false,"schema":{"type":"string","description":"Filter by outcome type. PENDING is a virtual value that matches jobs with no outcome reported yet (outcomeType IS NULL). It is independent of executionStatus, so it can be combined with any executionStatus filter (e.g. executionStatus=SUCCESS with outcomeType=PENDING returns jobs that completed successfully but have no outcome reported yet).","enum":["CONVERTED","ESCALATED","DEFLECTED","UNSUCCESSFUL","CUSTOM","PENDING"],"example":"CONVERTED"},"example":"CONVERTED"},{"name":"outcomeValueMin","in":"query","description":"Minimum outcome value filter (inclusive). Returns jobs with outcomeValue >= this value.","required":false,"schema":{"type":"number","description":"Minimum outcome value filter (inclusive). Returns jobs with outcomeValue >= this value.","example":100,"minimum":0},"example":100},{"name":"outcomeValueMax","in":"query","description":"Maximum outcome value filter (inclusive). Returns jobs with outcomeValue <= this value.","required":false,"schema":{"type":"number","description":"Maximum outcome value filter (inclusive). Returns jobs with outcomeValue <= this value.","example":5000,"minimum":0},"example":5000},{"name":"environment","in":"query","description":"Filter by environment (case-insensitive exact match).","required":false,"schema":{"type":"string","description":"Filter by environment (case-insensitive exact match).","example":"production"},"example":"production"},{"name":"startDate","in":"query","description":"Filter start date/time in ISO 8601 format (on job created date).","required":false,"schema":{"type":"string","description":"Filter start date/time in ISO 8601 format (on job created date).","example":"2025-09-01T00:00:00Z"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"Filter end date/time in ISO 8601 format (on job created date).","required":false,"schema":{"type":"string","description":"Filter end date/time in ISO 8601 format (on job created date).","example":"2025-09-30T23:59:59Z"},"example":"2025-09-30T23:59:59Z"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["created,DESC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Returns paginated job list.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobPagedModel_Read"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"post":{"tags":["Jobs"],"summary":"Create Job","description":"Create a new job. Jobs created via this endpoint will have source=UI.","operationId":"create_job","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium generated ID (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"description":"Job configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResource"},"examples":{"Basic Job":{"summary":"Create a basic UI-sourced job","description":"Minimal job with required fields only","value":{"agenticJobId":"invoice-processing-batch-42","name":"Invoice Processing","type":"batch","version":"1.0","environment":"production"}}}}},"required":true},"responses":{"201":{"description":"Job created successfully.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResource_Read"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User does not have permission to manage this team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict - A job with this ID already exists.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"422":{"description":"Validation failed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"delete":{"tags":["Jobs"],"summary":"Bulk Delete Jobs","description":"Delete multiple jobs by their agentic job IDs.","operationId":"bulk_delete_jobs","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium generated ID (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteRequest_Read"}}},"required":true},"responses":{"200":{"description":"Jobs deleted successfully.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteResponse_Read"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User does not have permission to manage this team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Validation failed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/jobs/{agenticJobId}/outcome":{"post":{"tags":["Jobs"],"summary":"Report Job Outcome","description":"Report the final execution status and business outcome for a completed job. Use `outcomeReason` to explain a FAILED or CANCELLED status — it is the prescribed field for a failure reason and should not be encoded inside `metadata`. Once reported, outcomes can be updated using PATCH /{agenticJobId}/outcome. Returns 409 Conflict if an outcome has already been reported for this job.","operationId":"report_job_outcome","parameters":[{"name":"agenticJobId","in":"path","description":"User-supplied external identifier for the job.","required":true,"schema":{"type":"string"},"example":"loan-app-12345"},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportOutcomeRequest_Read"}}},"required":true},"responses":{"200":{"description":"Outcome reported successfully.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResource_Read"}}}},"400":{"description":"Invalid request parameters or validation error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Job not found.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Outcome already reported. Use PATCH /{agenticJobId}/outcome to update.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"patch":{"tags":["Jobs"],"summary":"Update Job Outcome","description":"Update the outcome for a job that has already had its outcome reported — for example correcting a status that an SDK reported wrongly. Requires `reason` (why the record is being changed); the update is recorded in the outcome history. `outcomeReason` (why the job itself failed) is separate and optional: omit it to keep the current value, send an empty string to clear it. Returns 422 if no outcome has been reported yet, or if reason is missing or blank. Returns 409 if a concurrent update conflict is detected.","operationId":"update_job_outcome","parameters":[{"name":"agenticJobId","in":"path","description":"User-supplied external identifier for the job.","required":true,"schema":{"type":"string"},"example":"loan-app-12345"},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOutcomeRequest_Read"}}},"required":true},"responses":{"200":{"description":"Outcome updated successfully.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResource_Read"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Job not found.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict - Concurrent update detected; refetch and retry.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"422":{"description":"Unprocessable - No outcome to update yet, or reason is blank.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/invoices/{id}/payment-correction":{"post":{"tags":["Invoice"],"summary":"Record a manual payment correction for an invoice","description":"Records a manual payment received against the specified invoice and updates the invoice's pay state. Replaces the V1 `POST /v1/api/invoices/payment` endpoint.","operationId":"invoice_payment_correction","parameters":[{"name":"id","in":"path","description":"Unique identifier of the invoice receiving the payment correction. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentCorrectionRequest"}}},"required":true},"responses":{"200":{"description":"Returns the updated Invoice object reflecting the recorded payment.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/InvoiceResource"}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Invoice not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/integrations/gitlab/mappings":{"get":{"tags":["Gitlab User Mapping"],"summary":"List GitLab user mappings","description":"Lists every email-to-GitLab username mapping resolved (auto or manual) for the current organization.","operationId":"listGitlabUserMappings","responses":{"200":{"description":"Mappings returned","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitlabUserMappingResponse_Read"}}}},"400":{"description":"Bad request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"post":{"tags":["Gitlab User Mapping"],"summary":"Create or update a manual GitLab mapping","description":"Creates or updates a manual mapping; manual mappings always take precedence over auto-resolution.","operationId":"upsertGitlabUserMapping","requestBody":{"description":"Manual mapping between a platform user email and a GitLab username","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitlabUserMappingPayload"},"examples":{"Basic Mapping":{"summary":"Map a user email to a GitLab username","description":"Basic Mapping","value":{"userEmail":"dev@acme.com","gitlabUsername":"jdoe"}}}}},"required":true},"responses":{"201":{"description":"Mapping saved","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitlabUserMappingResponse_Read"}}}},"400":{"description":"Invalid payload","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict — username already mapped to another email","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/integrations/github/mappings":{"get":{"tags":["Github User Mapping"],"summary":"List Github user mappings","description":"Lists every email→Github login mapping resolved (auto or manual) for the current organization.","operationId":"listGithubUserMappings","responses":{"200":{"description":"Mappings returned","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubUserMappingResponse_Read"}}}},"400":{"description":"Bad request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"post":{"tags":["Github User Mapping"],"summary":"Create or update a manual Github mapping","description":"Creates or updates a manual mapping; manual mappings always take precedence over auto-resolution.","operationId":"upsertGithubUserMapping","requestBody":{"description":"Manual mapping between a platform user email and a Github login","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubUserMappingPayload"},"examples":{"Basic Mapping":{"summary":"Map a user email to a Github login","description":"Basic Mapping","value":{"userEmail":"dev@acme.com","githubLogin":"acme-dev"}}}}},"required":true},"responses":{"201":{"description":"Mapping saved","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubUserMappingResponse_Read"}}}},"400":{"description":"Invalid payload","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict — login already mapped to another email","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/integrations/directory/mappings":{"get":{"tags":["Directory Mappings"],"summary":"List directory mappings","description":"Lists every email→DirectoryPerson mapping resolved (auto or manual) for the current organization.","operationId":"listDirectoryLinkMappings","responses":{"200":{"description":"Mappings returned","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DirectoryLinkResponse_Read"}}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"post":{"tags":["Directory Mappings"],"summary":"Create or update a manual directory mapping","description":"Creates or updates a manual mapping; manual mappings always take precedence over auto-resolution.","operationId":"upsertDirectoryLinkMapping","parameters":[{"name":"teamId","in":"query","description":"Team (organization) identifier the mapping belongs to","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Manual mapping between a subscriber email and a DirectoryPerson","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertDirectoryLinkRequest"},"examples":{"Basic Mapping":{"summary":"Map a subscriber email to a directory person","description":"Basic Mapping","value":{"userEmail":"dev@acme.com","directoryPersonId":42}}}}},"required":true},"responses":{"201":{"description":"Mapping saved","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectoryLinkResponse_Read"}}}},"400":{"description":"Invalid payload","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"directoryPersonId not found in current organization","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/integration-credentials":{"get":{"tags":["Integration Credentials"],"summary":"List integration credentials","description":"Lists all active integration credentials for the authenticated user's organization. Tokens are NEVER returned.","operationId":"listIntegrationCredentials","responses":{"200":{"description":"Credentials returned successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationCredentialResponse_Read"}}}},"400":{"description":"Bad request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"post":{"tags":["Integration Credentials"],"summary":"Create or replace an integration credential","description":"Creates a new credential for the given integration_type, or replaces the existing one (one credential per integration_type per org). The token is validated against the provider before persistence.","operationId":"createIntegrationCredential","requestBody":{"description":"Integration credential payload. Supported integrationType values: github, anthropic, gitlab.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationCredentialPayload"},"examples":{"Github Credential":{"summary":"Store a Github fine-grained token","description":"The token is validated against the provider before persistence; the example value is illustrative only","value":{"integrationType":"github","credentialName":"acme-github-readonly","token":"github_pat_EXAMPLEONLY0000000000000000000000","metadata":{"orgName":"acme"}}},"GitLab Credential":{"summary":"Store a GitLab personal access token","description":"The token is validated against the provider before persistence; the example value is illustrative only","value":{"integrationType":"gitlab","credentialName":"acme-gitlab-readonly","token":"glpat-EXAMPLEONLY00000000000","metadata":{"groupPath":"acme/engineering"}}}}}},"required":true},"responses":{"201":{"description":"Credential created and validated","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationCredentialResponse_Read"}}}},"400":{"description":"Invalid payload or token rejected by provider","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/integration-credentials/{id}/sync":{"post":{"tags":["Integration Credentials"],"summary":"Trigger a manual sync for the credential","description":"Forces an immediate refresh of the integration data (e.g., Github or GitLab productivity sync) for the given credential.","operationId":"syncIntegrationCredential","parameters":[{"name":"id","in":"path","description":"Credential identifier","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"202":{"description":"Sync triggered","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}}},"400":{"description":"Sync not supported for this integration_type","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Credential not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/integration-credentials/github/repos":{"post":{"tags":["Integration Credentials"],"summary":"List a GitHub organization's repositories","description":"Lists the repositories of a GitHub organization for the connect/edit repo picker. Provide EITHER a raw 'token' (new connection, not yet stored) OR a 'credentialId' referencing an existing stored credential whose token is decrypted server-side. The token is used only to call GitHub and is NEVER logged or returned.","operationId":"listGithubOrgRepos","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubReposRequest"},"examples":{"New connection (raw token)":{"description":"New connection (raw token)","value":{"orgName":"revenium","token":"github_pat_EXAMPLEONLY0000000000000000000000"}},"Existing stored credential":{"description":"Existing stored credential","value":{"orgName":"revenium","credentialId":42}}}}},"required":true},"responses":{"200":{"description":"Repositories returned, sorted by fullName","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GithubRepoResponse_Read"}}}}},"400":{"description":"Invalid request (missing/ambiguous token vs credentialId, or invalid orgName)","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"GitHub token invalid, expired, or lacking scopes","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Caller not permitted to perform this operation","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Organization not found / no access, or credentialId not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflicting state for the requested operation","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"422":{"description":"Request understood but could not be processed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"GitHub rate limit reached","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/credentials":{"get":{"tags":["Credentials"],"summary":"List Credentials","description":"List credentials","operationId":"list_credentials","parameters":[{"name":"query","in":"query","description":"Optional search query to filter credentials. Searches across multiple fields including credential name, product key name, user username, user email address, organization name, and product name. Partial matches are supported. When omitted, returns all credentials for the specified team.","required":false,"schema":{"type":"string"},"example":"production-api-key"},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization) to filter credentials by. This parameter is required to scope results to a specific team's credentials. Users can only access teams they have permissions for. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"type","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Returns a paginated list of Credential objects.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedModel"},"examples":{"Credentials List":{"description":"Credentials List","value":{"_embedded":{"credentialResourceList":[{"id":"jM7X7QG","resourceType":"credential","label":"UNCLASSIFIED","created":"2025-10-13T19:09:16.597Z","name":"UNCLASSIFIED","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"organization":{"id":"QOjwW1Z","resourceType":"organization","label":"UNCLASSIFIED"},"subscriber":{"id":"78R8Abk","resourceType":"user","label":"unclassified@revenium.io"},"externalId":"UNCLASSIFIED","subscriptions":[],"tags":[],"_links":{"self":{"href":"/profitstream/v2/api/credentials/jM7X7QG"}}}]},"page":{"size":20,"totalElements":2,"totalPages":1,"number":0}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModel"},"examples":{"Credentials List":{"description":"Credentials List","value":{"_embedded":{"credentialResourceList":[{"id":"jM7X7QG","resourceType":"credential","label":"UNCLASSIFIED","created":"2025-10-13T19:09:16.597Z","name":"UNCLASSIFIED","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"organization":{"id":"QOjwW1Z","resourceType":"organization","label":"UNCLASSIFIED"},"subscriber":{"id":"78R8Abk","resourceType":"user","label":"unclassified@revenium.io"},"externalId":"UNCLASSIFIED","subscriptions":[],"tags":[],"_links":{"self":{"href":"/profitstream/v2/api/credentials/jM7X7QG"}}}]},"page":{"size":20,"totalElements":2,"totalPages":1,"number":0}}}}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Credentials"],"summary":"Create a Credential","description":"Creates a new credential.","operationId":"create_credential","requestBody":{"description":"Credential configuration. Requires teamId, organizationId, subscriberId, and externalId together.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialResource"},"examples":{"Basic Credential":{"summary":"Create a credential bound to a subscriber","description":"Minimal credential with the required reference set","value":{"name":"Production API Credential","label":"production-api-credential","teamId":"XPozNrw","organizationId":"XPozNrw","subscriberId":"br7r28g","externalId":"prod-api-credential-001"}}}}},"required":true},"responses":{"201":{"description":"Credential created successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialResource_Read"},"examples":{"Created Credential":{"description":"Created Credential","value":{"id":"3By4zQ6","resourceType":"credential","label":"Test Credential","created":"2025-10-23T19:06:34.745Z","name":"Test Credential","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"organization":{"id":"QOjwW1Z","resourceType":"organization","label":"UNCLASSIFIED"},"subscriber":{"id":"78R8Abk","resourceType":"user","label":"unclassified@revenium.io"},"externalId":"test-cred-001","externalSecret":"external-secret-value","subscriptions":[],"tags":[],"_links":{"self":{"href":"/profitstream/v2/api/credentials/3By4zQ6"}}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/CredentialResource_Read"},"examples":{"Created Credential":{"description":"Created Credential","value":{"id":"3By4zQ6","resourceType":"credential","label":"Test Credential","created":"2025-10-23T19:06:34.745Z","name":"Test Credential","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"organization":{"id":"QOjwW1Z","resourceType":"organization","label":"UNCLASSIFIED"},"subscriber":{"id":"78R8Abk","resourceType":"user","label":"unclassified@revenium.io"},"externalId":"test-cred-001","externalSecret":"external-secret-value","subscriptions":[],"tags":[],"_links":{"self":{"href":"/profitstream/v2/api/credentials/3By4zQ6"}}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Resource not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/billing/users/claude-code-contributions/sync":{"post":{"tags":["User Cost Attribution"],"summary":"Trigger Claude Code contributions sync","description":"Syncs contribution data from the Anthropic Analytics API using the admin key stored in Providers. Returns 202 Accepted immediately; data populates asynchronously.","operationId":"syncClaudeCodeContributions","responses":{"202":{"description":"Sync queued","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"No Anthropic provider credential found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/ai/cost-controls":{"get":{"tags":["Cost Controls"],"summary":"List Cost Controls for a team","description":"Returns a paginated list of cost controls for the specified team. Optional `query` parameter filters by rule name (case-insensitive substring match).","operationId":"list_cost_controls","parameters":[{"name":"query","in":"query","description":"Optional substring query against the rule name","required":false,"schema":{"type":"string"}},{"name":"teamId","in":"query","description":"Revenium-generated identifier of the team to scope the list","required":true,"schema":{"type":"string"},"example":"a91XJp"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Page of cost controls","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedModel_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModel_Read"}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"post":{"tags":["Cost Controls"],"summary":"Create a Cost Control","description":"Creates a new cost control for cost enforcement. Shadow mode evaluates without blocking; non-shadow rules block AI transactions when the threshold is crossed within the rolling window.","operationId":"create_cost_control","requestBody":{"description":"Cost control rule configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostControlResource"},"examples":{"Daily Token Budget":{"summary":"Block gpt-4 traffic past a daily token budget","description":"TOKEN_COUNT rule with a model filter; BLOCK action, daily rolling window","value":{"name":"Daily gpt-4 token budget","description":"Block gpt-4 traffic past 1000 tokens per day","teamId":"XPozNrw","metricType":"TOKEN_COUNT","hardLimit":1000,"windowType":"DAILY","action":"BLOCK","shadowMode":false,"enabled":true,"filters":[{"dimension":"MODEL","operator":"IS","value":"gpt-4"}]}}}}},"required":true},"responses":{"201":{"description":"Cost control created","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostControlResource_Read"}}}},"400":{"description":"Invalid input","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/ai/alerts/{anomalyId}/budget/reset":{"post":{"tags":["AI Anomaly Progress"],"summary":"Reset Budget Accumulation for AI Anomaly","description":"Reset the in-flight period accumulation for a CUMULATIVE_USAGE anomaly. The natural period boundary is unchanged.","operationId":"resetBudgetAccumulation","parameters":[{"name":"anomalyId","in":"path","description":"Unique identifier of the AI anomaly","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Budget accumulation reset successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BudgetProgressResource"},{"$ref":"#/components/schemas/GroupedBudgetProgressResource"}]}},"application/hal+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BudgetProgressResource"},{"$ref":"#/components/schemas/GroupedBudgetProgressResource"}]}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Anomaly not found or not accessible to caller's organization","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict - reset could not be applied","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Anomaly is not a CUMULATIVE_USAGE budget or is missing period type","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/agents":{"get":{"tags":["Agents"],"summary":"List agents","description":"List all registered agents for the team","operationId":"list_agents","parameters":[{"name":"query","in":"query","description":"Search query matched against display name and telemetry key","required":false,"schema":{"type":"string"}},{"name":"teamId","in":"query","description":"Team identifier","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["created,DESC","id,DESC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Collection of agents","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPagedModel_Read"},"examples":{"Agents List":{"description":"Agents List","value":{"_embedded":{"agentResourceList":[{"id":"d5jKBD","resourceType":"agent","label":"Marketing Agent","created":"2026-07-01T18:37:42.821Z","updated":"2026-07-03T19:04:15.811Z","telemetryKey":"marketing-agent","displayName":"Marketing Agent","source":"API","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"_links":{"self":{"href":"/profitstream/v2/api/agents/d5jKBD"}}}]},"page":{"size":20,"totalElements":1,"totalPages":1,"number":0}}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"post":{"tags":["Agents"],"summary":"Register agent","description":"Register an agent for the team. The telemetry key is the exact string sent in the `agent` field of telemetry, matched case-insensitively and unique per team. Registering a key that has not been observed yet is allowed","operationId":"create_agent","requestBody":{"description":"Agent to register","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResource"},"examples":{"Register observed agent":{"summary":"Register a telemetry value surfaced by the discovery endpoint","description":"Register observed agent","value":{"telemetryKey":"marketing-agent","displayName":"Marketing Agent","ownerId":"l396LD","teamId":"XPozX1E"}}}}},"required":true},"responses":{"201":{"description":"Agent registered successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResource_Read"},"examples":{"Registered Agent":{"description":"Registered Agent","value":{"id":"d5jKBD","resourceType":"agent","label":"Marketing Agent","created":"2026-07-10T19:04:21.957Z","telemetryKey":"marketing-agent","displayName":"Marketing Agent","source":"API","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"_links":{"self":{"href":"/profitstream/v2/api/agents/d5jKBD"}}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team or owner not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Agent already exists with this telemetry key","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/workspaces/{id}/name":{"patch":{"tags":["Workspaces"],"summary":"Set Workspace Revenium Name","description":"Updates the user-defined display name override for a workspace.","operationId":"set_workspace_revenium_name","parameters":[{"name":"id","in":"path","description":"Unique identifier of workspace","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization)","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkspaceNameRequest_Read"}}},"required":true},"responses":{"200":{"description":"Revenium name updated successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceMetadataResource_Read"},"examples":{"Updated Workspace":{"description":"Updated Workspace","value":{"id":"workspace-001","resourceType":"workspace_metadata","label":"Production Workspace","created":"2025-10-23T19:30:00.000Z","updated":"2025-10-23T19:35:00.000Z","provider":"AWS","workspaceId":"ws-12345","reveniumName":"Production Environment","_links":{"self":{"href":"/profitstream/v2/api/workspaces/workspace-001"}}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/WorkspaceMetadataResource_Read"},"examples":{"Updated Workspace":{"description":"Updated Workspace","value":{"id":"workspace-001","resourceType":"workspace_metadata","label":"Production Workspace","created":"2025-10-23T19:30:00.000Z","updated":"2025-10-23T19:35:00.000Z","provider":"AWS","workspaceId":"ws-12345","reveniumName":"Production Environment","_links":{"self":{"href":"/profitstream/v2/api/workspaces/workspace-001"}}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Workspace not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/tenants/{id}/strict-ingestion-mode":{"patch":{"tags":["Tenants"],"summary":"Toggle a tenant's strict ingestion mode","description":"Enable or disable strict ingestion mode for the tenant. When enabled, AI ingestion rejects transactions that reference entities (Product, Subscriber, Credential, Consuming Organization) which do not already exist for the tenant, instead of auto-creating them. Defaults to disabled.","operationId":"update_tenant_strict_ingestion_mode","parameters":[{"name":"id","in":"path","description":"Unique identifier of the tenant. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrictIngestionModeRequest_Read"}}},"required":true},"responses":{"200":{"description":"Strict ingestion mode updated","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantResource_Read"}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Tenant not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict - Resource conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/teams/{id}/logo":{"delete":{"tags":["Teams"],"summary":"Delete Team Logo","description":"Deletes the logo for a team.","operationId":"delete_team_logo","parameters":[{"name":"id","in":"path","description":"Unique identifier of the team. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Team logo deleted successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Team not found or no logo exists","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["Teams"],"summary":"Update Team Logo","description":"Updates the logo for a team. Accepts multipart/form-data with a file field named 'file'.","operationId":"update_team_logo","parameters":[{"name":"id","in":"path","description":"Unique identifier of the team. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"200":{"description":"Team logo updated successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResource_Read"}}}},"400":{"description":"Invalid file format or size","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/{id}/logo":{"delete":{"tags":["Sources"],"summary":"Delete a Source's Logo","description":"Deletes the logo for the specified source.","operationId":"delete_source_logo","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Source logo deleted successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"},"examples":{"Source Logo Deleted":{"description":"Source Logo Deleted","value":{"message":"Logo for source with ID qx1yRL4 has been successfully deleted.","id":"qx1yRL4","updated":"2025-10-22T19:32:00.000Z","resourceType":"source-logo"}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"},"examples":{"Source Logo Deleted":{"description":"Source Logo Deleted","value":{"message":"Logo for source with ID qx1yRL4 has been successfully deleted.","id":"qx1yRL4","updated":"2025-10-22T19:32:00.000Z","resourceType":"source-logo"}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Source not found or no logo found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["Sources"],"summary":"Update the Logo of a Source","description":"Associates a PNG logo with an existing source.","operationId":"update_source_logo","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"200":{"description":"Logo updated successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceResource_Read"},"examples":{"Source Logo Updated":{"description":"Source Logo Updated","value":{"id":"qx1yRL4","resourceType":"source","label":"Default","created":"2025-10-13T19:09:10.788Z","updated":"2025-10-22T19:36:39.382Z","name":"Default","description":"AI Default Source","version":"1.0.0","type":"AI","syncedWithApiGateway":false,"autoDiscoveryEnabled":false,"sourceType":"UNKNOWN","tags":[],"sourceClassifications":[],"owner":{"id":"br7rP0K","resourceType":"user","label":"user@example.com"},"team":{"id":"XPozX1E","resourceType":"team","label":"Example Team Name"},"products":[{"id":"3BygBBL","resourceType":"product","label":"Default AI Product"}],"contracts":[],"meteringId":"Ag8nd4k:eb27437c-617c-4f9d-9104-985bdc3d86e7","metadata":""}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Source not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/products/{id}/logo":{"delete":{"tags":["Products"],"summary":"Delete a Product's Logo","description":"Deletes the logo for the specified product.","operationId":"delete_product_logo","parameters":[{"name":"id","in":"path","description":"Unique identifier of the product whose logo will be updated. Format: Revenium id (URL-safe encoded string)","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Product logo deleted successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"},"examples":{"Product Logo Deleted":{"description":"Product Logo Deleted","value":{"message":"Logo for product with ID o41Zr6J has been successfully deleted.","id":"o41Zr6J","resourceType":"product-logo","created":"2025-10-22T20:45:05.583169488Z","updated":"2025-10-22T20:45:05.583Z"}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"},"examples":{"Product Logo Deleted":{"description":"Product Logo Deleted","value":{"message":"Logo for product with ID o41Zr6J has been successfully deleted.","id":"o41Zr6J","resourceType":"product-logo","created":"2025-10-22T20:45:05.583169488Z","updated":"2025-10-22T20:45:05.583Z"}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Product not found or no logo found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["Products"],"summary":"Update a Product's Logo","description":"Updates the logo for the specified product.","operationId":"update_product_logo","parameters":[{"name":"id","in":"path","description":"Unique identifier of the product whose logo will be updated. Format: Revenium id (URL-safe encoded string)","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"200":{"description":"Product logo updated successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResource"},"examples":{"Product Logo Updated":{"description":"Product Logo Updated","value":{"id":"o41Zr6J","resourceType":"product","label":"test-product-logo","created":"2025-10-22T20:44:49.520Z","updated":"2025-10-22T20:44:57.112Z","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"owner":{"id":"br7rP0K","resourceType":"user","label":"user@example.com"},"name":"test-product-logo","version":"1.0.0","description":"Test product for logo","logo":"https://cdn.dev.hcapp.io/product-logo-o41Zr6J-7db9138c.png","published":false,"preview":false,"tags":[],"meteringModels":[],"subscriptionCount":0,"_links":{"self":{"href":"/profitstream/v2/api/products/o41Zr6J"}}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ProductResource"},"examples":{"Product Logo Updated":{"description":"Product Logo Updated","value":{"id":"o41Zr6J","resourceType":"product","label":"test-product-logo","created":"2025-10-22T20:44:49.520Z","updated":"2025-10-22T20:44:57.112Z","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"owner":{"id":"br7rP0K","resourceType":"user","label":"user@example.com"},"name":"test-product-logo","version":"1.0.0","description":"Test product for logo","logo":"https://cdn.dev.hcapp.io/product-logo-o41Zr6J-7db9138c.png","published":false,"preview":false,"tags":[],"meteringModels":[],"subscriptionCount":0,"_links":{"self":{"href":"/profitstream/v2/api/products/o41Zr6J"}}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Product not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/org-units/{id}":{"delete":{"tags":["Org Units"],"summary":"Delete an org unit","description":"Soft-deletes the unit. Refuses (409) if the unit has active children; closes any open memberships on the unit in the same transaction.","operationId":"deleteOrgUnit","parameters":[{"name":"teamId","in":"query","description":"Team (organization) identifier the unit belongs to","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Org unit identifier","required":true,"schema":{"type":"integer","format":"int64"},"example":42}],"responses":{"204":{"description":"Org unit deleted","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Org unit not found in current organization","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Org unit has active children","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["Org Units"],"summary":"Rename and/or reparent an org unit","description":"Updates name when present. Moves the unit to parentId (null = root) only when reparent=true — this makes parentId:null unambiguous (\"move to root\" vs. \"leave parent unchanged\"). A payload with name omitted and reparent=false performs no mutation and returns the unit's current state (equivalent to a GET) rather than rejecting the request.","operationId":"updateOrgUnit","parameters":[{"name":"teamId","in":"query","description":"Team (organization) identifier the unit belongs to","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Org unit identifier","required":true,"schema":{"type":"integer","format":"int64"},"example":42}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgUnitRequest_Read"}}},"required":true},"responses":{"200":{"description":"Org unit updated","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUnitResponse_Read"}}}},"400":{"description":"Invalid payload","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Org unit (or the new parentId) not found in current organization","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"An org unit with this name already exists under the parent","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"422":{"description":"Reparent would move the unit into its own subtree","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/jobs/{agenticJobId}":{"get":{"tags":["Jobs"],"summary":"Get Job","description":"Get a job by its agentic job ID (user-supplied external identifier).","operationId":"get_job","parameters":[{"name":"agenticJobId","in":"path","description":"User-supplied external identifier for the job.","required":true,"schema":{"type":"string"},"example":"loan-app-12345"},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Returns job.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResource_Read"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Job not found.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"delete":{"tags":["Jobs"],"summary":"Delete Job","description":"Delete a job by its agentic job ID.","operationId":"delete_job","parameters":[{"name":"agenticJobId","in":"path","description":"User-supplied external identifier for the job.","required":true,"schema":{"type":"string"},"example":"loan-app-12345"},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium generated ID (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Job deleted successfully.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse_Read"}}}},"400":{"description":"Invalid request.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User does not have permission to manage this team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Job not found.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"patch":{"tags":["Jobs"],"summary":"Update Job","description":"Update an existing job. Only non-null fields in the request will be applied.","operationId":"update_job","parameters":[{"name":"agenticJobId","in":"path","description":"User-supplied external identifier for the job.","required":true,"schema":{"type":"string"},"example":"loan-app-12345"},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium generated ID (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"description":"Partial job update; only non-null fields are applied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResource"},"examples":{"Basic Job Update":{"summary":"Rename a job","description":"Patch the job's display name and environment","value":{"name":"Invoice Processing v2","environment":"staging"}}}}},"required":true},"responses":{"200":{"description":"Job updated successfully.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResource_Read"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User does not have permission to manage this team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Job not found.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Validation failed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/integration-credentials/{id}/metadata":{"patch":{"tags":["Integration Credentials"],"summary":"Update integration credential metadata","description":"Updates only the metadata (e.g., allowedRepos, claudeCoAuthorPatterns) without re-validating the token.","operationId":"updateIntegrationCredentialMetadata","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}},"required":true},"responses":{"200":{"description":"Metadata updated","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationCredentialResponse_Read"}}}},"400":{"description":"Invalid metadata","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"Credential not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/ai/cost-controls/{id}":{"get":{"tags":["Cost Controls"],"summary":"Get a Cost Control by ID","description":"Retrieve a single cost control by its Revenium-generated identifier.","operationId":"get_cost_control","parameters":[{"name":"id","in":"path","description":"Revenium-generated identifier of the cost control","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Cost control","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostControlResource_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/CostControlResource_Read"}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Cost control not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"delete":{"tags":["Cost Controls"],"summary":"Delete a Cost Control","description":"Soft-deletes a cost control. The rule is marked inactive and removed from evaluation but retained for historical audit.","operationId":"delete_cost_control","parameters":[{"name":"id","in":"path","description":"Revenium-generated identifier of the cost control","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Cost control deleted","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Cost control not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["Cost Controls"],"summary":"Update a Cost Control (partial)","description":"PATCH — only fields present in the request body are applied. Passing `filters` (including an empty list) replaces the full filter set; omit `filters` to leave it unchanged. Same replacement semantics apply to `notificationChannelIds`. Nullable scalar fields (`description`, `denyMessage`, `warnThreshold`, `hardLimit`, `groupBy`) use the `Patchable<T>` tri-state contract: **omit the field** to leave the persisted value unchanged; pass explicit JSON **`null`** to clear a previously-set value; pass a non-null value to set it.","operationId":"update_cost_control","parameters":[{"name":"id","in":"path","description":"Revenium-generated identifier of the cost control","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostControlResource_Write"}}},"required":true},"responses":{"200":{"description":"Cost control updated","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostControlResource_Read"}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Cost control not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/workspaces":{"get":{"tags":["Workspaces"],"summary":"List Workspaces","description":"Retrieves workspace metadata for the authenticated user's organization with grouping by display name.","operationId":"list_workspaces","parameters":[{"name":"query","in":"query","description":"Search by provider name, workspace ID, or revenium name","required":false,"schema":{"type":"string"}},{"name":"provider","in":"query","description":"Filter results by AI provider. Omit to include all providers.","required":false,"schema":{"type":"string","maxLength":50,"minLength":0},"example":"anthropic"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["updated,DESC","id,DESC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Workspaces retrieved successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedModel_Read"},"examples":{"Workspaces List":{"description":"Workspaces List","value":{"_embedded":{"workspaceMetadataResourceList":[{"id":"workspace-001","resourceType":"workspace_metadata","label":"Production Workspace","created":"2025-10-23T19:30:00.000Z","updated":"2025-10-23T19:30:00.000Z","provider":"AWS","workspaceId":"ws-12345","reveniumName":"Production","_links":{"self":{"href":"/profitstream/v2/api/workspaces/workspace-001"}}}]},"page":{"size":20,"totalElements":1,"totalPages":1,"number":0}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModel_Read"},"examples":{"Workspaces List":{"description":"Workspaces List","value":{"_embedded":{"workspaceMetadataResourceList":[{"id":"workspace-001","resourceType":"workspace_metadata","label":"Production Workspace","created":"2025-10-23T19:30:00.000Z","updated":"2025-10-23T19:30:00.000Z","provider":"AWS","workspaceId":"ws-12345","reveniumName":"Production","_links":{"self":{"href":"/profitstream/v2/api/workspaces/workspace-001"}}}]},"page":{"size":20,"totalElements":1,"totalPages":1,"number":0}}}}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/users/{id}/subscriptions":{"get":{"tags":["Users"],"summary":"List Subscriptions for a User","description":"Retrieve a paginated list of subscriptions for a user.","operationId":"list_subscriptions_for_user","parameters":[{"name":"productId","in":"query","description":"The product id","required":false,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Unique identifier of the user to retrieve subscriptions for. This is the Revenium-generated hashid returned when the user was created, visible in the user list endpoint, and used in all user-related API operations. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Returns a paginated list of Subscription objects.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPagedModel_Read"},"examples":{"User Subscriptions List":{"description":"User Subscriptions List","value":{"page":{"size":20,"totalElements":0,"totalPages":0,"number":0}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SubscriptionPagedModel_Read"},"examples":{"User Subscriptions List":{"description":"User Subscriptions List","value":{"page":{"size":20,"totalElements":0,"totalPages":0,"number":0}}}}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - user is not authorized to view the organization's users","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"User or product not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/users/{id}/period-charges":{"get":{"tags":["Users"],"summary":"List Period charges for a User (keyset/cursor)","description":"Keyset-paginated list of period charges owned by a user. Returns items in `_embedded.periodChargeResourceList` plus an opaque top-level `cursor` (`null` on the last page) and a `hasMore` flag — no `totalElements`, no `totalPages`. Pass the previous response's `cursor` back as the `cursor` query param to fetch the next page. Replaces the prior offset/`PagedModel` contract.","operationId":"list_period_charges_for_user","parameters":[{"name":"id","in":"path","description":"Unique identifier of the user to retrieve period charges for. This is the Revenium-generated hashid returned when the user was created, visible in the user list endpoint, and used in all user-related API operations. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"productId","in":"query","description":"The product id","required":false,"schema":{"type":"string"}},{"name":"Start timestamp","in":"query","required":true,"schema":{"type":"string"}},{"name":"End timestamp","in":"query","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Opaque cursor from the previous response's top-level `cursor`. Omit for the first page.","required":false,"schema":{"type":"string"}},{"name":"size","in":"query","description":"Page size. Clamped to [1, 200].","required":false,"schema":{"type":"integer","format":"int32","default":50},"example":50}],"responses":{"200":{"description":"Returns a cursor-paginated list of Period Charge objects.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodChargeKeysetPage_Read"},"examples":{"User Period Charges Keyset Page":{"description":"User Period Charges Keyset Page","value":{"_embedded":{"periodChargeResourceList":[]},"hasMore":false}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PeriodChargeKeysetPage_Read"},"examples":{"User Period Charges Keyset Page":{"description":"User Period Charges Keyset Page","value":{"_embedded":{"periodChargeResourceList":[]},"hasMore":false}}}}}},"400":{"description":"Invalid request parameters (e.g. malformed cursor)","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - user is not authorized to view the organization's users","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"User or product not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/users/{id}/invoices":{"get":{"tags":["Users"],"summary":"List Invoices for a User","description":"Retrieve a paginated list of invoices for a user.","operationId":"list_invoices_for_user","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Returns a paginated list of Invoice objects.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicePagedModel_Read"},"examples":{"User Invoices List":{"description":"User Invoices List","value":{"page":{"size":20,"totalElements":0,"totalPages":0,"number":0}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/InvoicePagedModel_Read"},"examples":{"User Invoices List":{"description":"User Invoices List","value":{"page":{"size":20,"totalElements":0,"totalPages":0,"number":0}}}}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - user is not authorized to view the organization's users","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"User not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/users/{id}/credentials":{"get":{"tags":["Users"],"summary":"List Credentials for a User","description":"Retrieve a paginated list of credentials for a user.","operationId":"list_credentials_for_user","parameters":[{"name":"productId","in":"query","description":"The product id","required":false,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Unique identifier of the user to retrieve credentials for. This is the Revenium-generated hashid returned when the user was created, visible in the user list endpoint, and used in all user-related API operations. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Returns a paginated list of Credential objects.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialPagedModel_Read"},"examples":{"User Credentials List":{"description":"User Credentials List","value":{"page":{"size":20,"totalElements":0,"totalPages":0,"number":0}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/CredentialPagedModel_Read"},"examples":{"User Credentials List":{"description":"User Credentials List","value":{"page":{"size":20,"totalElements":0,"totalPages":0,"number":0}}}}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - user is not authorized to view the organization's users","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"User or product not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/users/me":{"get":{"tags":["Users"],"summary":"Get the User Associated with the Current Security Context","description":"Get the user associated with the current security context","operationId":"get_current_user","responses":{"200":{"description":"Returns a User object.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResource"},"examples":{"Current User":{"description":"Current User","value":{"id":"br7rP0K","resourceType":"user","label":"user@example.com","created":"2025-10-13T19:09:08.410Z","updated":"2025-10-16T01:45:46.586Z","email":"user@example.com","firstName":"Jason","lastName":"Cumberland","roles":["ROLE_TENANT_ADMIN"],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"teams":[{"id":"XPozX1E","resourceType":"team","label":"Example Team Name"}],"_links":{"self":{"href":"/profitstream/v2/api/users/br7rP0K"}}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/UserResource"},"examples":{"Current User":{"description":"Current User","value":{"id":"br7rP0K","resourceType":"user","label":"user@example.com","created":"2025-10-13T19:09:08.410Z","updated":"2025-10-16T01:45:46.586Z","email":"user@example.com","firstName":"Jason","lastName":"Cumberland","roles":["ROLE_TENANT_ADMIN"],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"teams":[{"id":"XPozX1E","resourceType":"team","label":"Example Team Name"}],"_links":{"self":{"href":"/profitstream/v2/api/users/br7rP0K"}}}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"User not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/users/lookup-by-email":{"get":{"tags":["Users"],"summary":"Get a User by Email Address","description":"Retrieve a user by their email address.","operationId":"get_user_by_email","parameters":[{"name":"email","in":"query","description":"Email address of the user to retrieve. Must be a valid email format. The search is case-insensitive and matches the exact email address registered in the system.","required":true,"schema":{"type":"string"},"example":"user@example.com"}],"responses":{"200":{"description":"Returns a User object.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResource"},"examples":{"User by Email":{"description":"User by Email","value":{"id":"br7rP0K","resourceType":"user","label":"user@example.com","created":"2025-10-13T19:09:08.410Z","updated":"2025-10-16T01:45:46.586Z","email":"user@example.com","firstName":"Jason","lastName":"Cumberland","roles":["ROLE_TENANT_ADMIN"],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"teams":[{"id":"XPozX1E","resourceType":"team","label":"Example Team Name"}],"_links":{"self":{"href":"/profitstream/v2/api/users/br7rP0K"}}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/UserResource"},"examples":{"User by Email":{"description":"User by Email","value":{"id":"br7rP0K","resourceType":"user","label":"user@example.com","created":"2025-10-13T19:09:08.410Z","updated":"2025-10-16T01:45:46.586Z","email":"user@example.com","firstName":"Jason","lastName":"Cumberland","roles":["ROLE_TENANT_ADMIN"],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"teams":[{"id":"XPozX1E","resourceType":"team","label":"Example Team Name"}],"_links":{"self":{"href":"/profitstream/v2/api/users/br7rP0K"}}}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"User not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/tools/by-tool-id/{toolId}":{"get":{"tags":["Tools"],"summary":"Get Tool by toolId","description":"Retrieves a tool by its toolId within a team","operationId":"get_tool_by_tool_id","parameters":[{"name":"teamId","in":"query","description":"Team ID","required":true,"schema":{"type":"string"}},{"name":"toolId","in":"path","description":"Tool ID within organization","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Tool retrieved successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityModelToolResource_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/EntityModelToolResource_Read"}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"Tool not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/tenants/{tenantId}/join-requests":{"get":{"tags":["Tenant Join Requests"],"summary":"List join requests for a tenant","description":"Lists join requests for the caller's tenant, filtered by status (defaults to PENDING).","operationId":"list_tenant_join_requests","parameters":[{"name":"tenantId","in":"path","description":"Unique identifier of the tenant. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"status","in":"query","description":"Status filter","required":false,"schema":{"type":"string","default":"PENDING","enum":["PENDING","APPROVED","DENIED","WITHDRAWN","EXPIRED","PROCEEDED_SOLO"]},"example":"PENDING"},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"200":{"description":"Join requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantJoinRequestResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/TenantJoinRequestResource"}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Tenant not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/tenants/{id}":{"get":{"tags":["Tenants"],"summary":"Get a tenant by ID","description":"Get a tenant by its unique identifier","operationId":"get_tenant","parameters":[{"name":"id","in":"path","description":"Unique identifier of the tenant to retrieve. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Returns a tenant object.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantResource"},"examples":{"Tenant Response":{"description":"Tenant Response","value":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant","created":"2025-10-13T19:09:08.234Z","updated":"2025-10-16T19:03:11.216Z","name":"Tenant name","description":"Example description","profileType":"AI","aiDataIngested":true,"billingProfile":{"planType":"DEVELOPER","aiSpend":0,"calculatedRevenue":0,"overAIQuota":false,"overProductQuota":false,"revenueCalculationEnabled":false,"subscriptionId":"jM7BRp7"},"_links":{"self":{"href":"/profitstream/v2/api/tenants/Ag8nd4k"}}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/TenantResource"},"examples":{"Tenant Response":{"description":"Tenant Response","value":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant","created":"2025-10-13T19:09:08.234Z","updated":"2025-10-16T19:03:11.216Z","name":"Tenant name","description":"Example description","profileType":"AI","aiDataIngested":true,"billingProfile":{"planType":"DEVELOPER","aiSpend":0,"calculatedRevenue":0,"overAIQuota":false,"overProductQuota":false,"revenueCalculationEnabled":false,"subscriptionId":"jM7BRp7"},"_links":{"self":{"href":"/profitstream/v2/api/tenants/Ag8nd4k"}}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Tenant not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/tenants/{id}/usage":{"get":{"tags":["Tenants"],"summary":"Get total AI cost tracked for a tenant","description":"Retrieve the total AI cost tracked for a tenant within a specified date range","operationId":"get_total_ai_cost_tracked","parameters":[{"name":"id","in":"path","description":"Unique identifier of the tenant. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"start","in":"query","description":"Start date for the usage period in ISO 8601 format (YYYY-MM-DD).","required":true,"schema":{"type":"string"},"example":"2025-01-01"},{"name":"end","in":"query","description":"End date for the usage period in ISO 8601 format (YYYY-MM-DD).","required":true,"schema":{"type":"string"},"example":"2025-01-31"}],"responses":{"200":{"description":"Total AI cost tracked","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"type":"string"},"examples":{"AI Cost Tracked":{"description":"AI Cost Tracked","value":{"totalCost":0,"totalCostByProvider":{"Anthropic":0.087825,"OpenAI":0.2645},"totalCalculatedRevenue":0,"start":"2025-10-01T00:00:00.000Z","end":"2025-10-31T23:59:59.999Z"}}}},"application/hal+json":{"schema":{"type":"string"},"examples":{"AI Cost Tracked":{"description":"AI Cost Tracked","value":{"totalCost":0,"totalCostByProvider":{"Anthropic":0.087825,"OpenAI":0.2645},"totalCalculatedRevenue":0,"start":"2025-10-01T00:00:00.000Z","end":"2025-10-31T23:59:59.999Z"}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"Tenant not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/tenants/{id}/ingestion-failures":{"get":{"tags":["Tenants"],"summary":"List strict-ingestion rejections for a tenant","description":"Returns a paginated, newest-first list of AI transactions that strict ingestion mode rejected for this tenant, each with structured error details and the (prompt-redacted) original payload. Optionally filtered by error code.","operationId":"list_tenant_ingestion_failures","parameters":[{"name":"id","in":"path","description":"Unique identifier of the tenant. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"errorCode","in":"query","description":"Optional StrictIngestionErrorCode to filter by (e.g. PRODUCT_NOT_FOUND).","required":false,"schema":{"type":"string"},"example":"PRODUCT_NOT_FOUND"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":50,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Page of strict-ingestion rejections","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionFailureResource_Read"}}}},"400":{"description":"Invalid request (e.g. malformed page or size)","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Tenant not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/teams/{id}/tags":{"get":{"tags":["Teams"],"summary":"Retrieve all Tags Associated with a team","description":"Retrieve all tags associated with a team","operationId":"get_team_tags","parameters":[{"name":"id","in":"path","description":"Unique identifier of the team. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"The tags associated with the specified team","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}},"examples":{"Team Tags List":{"description":"Team Tags List","value":["enterprise","api","premium","production","v2","enhanced"]}}},"application/hal+json":{"schema":{"type":"array","items":{"type":"string"}},"examples":{"Team Tags List":{"description":"Team Tags List","value":["enterprise","api","premium","production","v2","enhanced"]}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/teams/parent/{parentId}":{"get":{"tags":["Teams"],"summary":"List Child Teams","description":"Retrieve a paginated list of child teams for a parent team.","operationId":"list_teams_by_parent","parameters":[{"name":"parentId","in":"path","description":"Unique identifier of the parent team. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"isDemo","in":"query","description":"Includes a special kind of organization in results that is no longer used.  To be deprecated in the future. Optional; defaults to false.","required":false,"schema":{"type":"boolean"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Paged list of teams","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationPagedModel"},"examples":{"Teams by Parent List":{"description":"Teams by Parent List","value":{"page":{"size":20,"totalElements":0,"totalPages":0,"number":0}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/OrganizationPagedModel"},"examples":{"Teams by Parent List":{"description":"Teams by Parent List","value":{"page":{"size":20,"totalElements":0,"totalPages":0,"number":0}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Parent team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/subscriptions/{id}/quota-consumed":{"get":{"tags":["Subscriptions"],"summary":"Get the Total Quota consumed for a Subscription","description":"Get the total quota consumed for a subscription","operationId":"get_subscription_quota_consumed","parameters":[{"name":"id","in":"path","description":"Unique identifier of the subscription. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"The total quota consumed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuotaConsumed"},"examples":{"Quota Consumed":{"description":"Quota Consumed","value":{"limit":0,"consumed":0}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/QuotaConsumed"},"examples":{"Quota Consumed":{"description":"Quota Consumed","value":{"limit":0,"consumed":0}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Subscription not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/subscriptions/{id}/billed-amount":{"get":{"tags":["Subscriptions"],"summary":"Get Current Period Billed Amount for a Subscription","description":"Returns the total amount on the invoice for the subscription's current billing period. This total is written by the invoice generation workflow on a billing cadence and is not recomputed on each metering event. Returns 0 if invoice generation has not yet run for the current period. For a real-time view of consumption against quota, see GET /subscriptions/{id}/quota-consumed.","operationId":"get_subscription_billed_amount","parameters":[{"name":"id","in":"path","description":"Unique identifier of the subscription. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"The total amount billed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmountBilled"},"examples":{"Amount Billed":{"description":"Amount Billed","value":{"amountBilled":0}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AmountBilled"},"examples":{"Amount Billed":{"description":"Amount Billed","value":{"amountBilled":0}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Subscription not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/subscribers/lookup-by-email":{"get":{"tags":["Subscribers"],"summary":"Get a Subscriber by Email Address","description":"Retrieve a subscriber by their email address.","operationId":"get_subscriber_by_email","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a Subscriber object.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SubscriberResource"}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Subscriber not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/subscribers/by-organization/{organizationId}":{"get":{"tags":["Subscribers"],"summary":"List Subscribers of an Organization","description":"Retrieve a paginated list of subscribers that are direct members of a single organization.","operationId":"list_subscribers_by_organization","parameters":[{"name":"organizationId","in":"path","description":"Unique identifier of the organization whose direct members to list. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"query","in":"query","description":"The search query for email, firstName or lastName","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["id,ASC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Returns a paginated list of the organization's Subscriber objects.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberPagedModel_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SubscriberPagedModel_Read"}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - subscriber is not authorized to view the organization's subscribers","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/squads":{"get":{"tags":["Squads"],"summary":"Get Squad Executions","description":"Get paginated list of squad executions (individual runs of a multi-agent workflow) with aggregated metrics. Can be filtered by date range.","operationId":"list_squad_executions","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Time period for analysis. If not provided, defaults to THIRTY_DAYS.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]}},{"name":"squadName","in":"query","description":"Filter by squad name (not yet implemented). Will support partial match, case-insensitive.","required":false,"schema":{"type":"string"},"example":"Loan Processing"},{"name":"status","in":"query","description":"Filter by squad status (not yet implemented). Values: SUCCESS, PARTIAL, FAILED.","required":false,"schema":{"type":"string"},"example":"SUCCESS"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["totalCost,DESC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Returns a paginated list of squad execution resources.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SquadExecutionListPagedModel_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SquadExecutionListPagedModel_Read"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/squads/{squadId}":{"get":{"tags":["Squads"],"summary":"Get Squad Detail","description":"Get detailed information for a specific squad including all aggregated metrics, agent breakdown showing each agent's contribution (role, tokens, cost, duration), and trace references for drill-down.","operationId":"get_squad_detail","parameters":[{"name":"squadId","in":"path","description":"The unique squad identifier.","required":true,"schema":{"type":"string"},"example":"loan-processing-squad-12345"},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Time period for analysis. If not provided, defaults to THIRTY_DAYS.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]}}],"responses":{"200":{"description":"Returns detailed squad information.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SquadDetailResource_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SquadDetailResource_Read"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Squad not found.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/squads/{squadId}/timeline":{"get":{"tags":["Squads"],"summary":"Get Squad Timeline","description":"Get ordered sequence of events for a squad execution. Returns timeline data suitable for waterfall visualization, including each transaction's start time, duration, model, cost, and agent role.","operationId":"get_squad_timeline","parameters":[{"name":"squadId","in":"path","description":"The unique squad identifier.","required":true,"schema":{"type":"string"},"example":"loan-processing-squad-12345"},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Time period for analysis. If not provided, defaults to THIRTY_DAYS.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]}}],"responses":{"200":{"description":"Returns squad timeline with ordered events.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SquadTimelineResource_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SquadTimelineResource_Read"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Squad not found.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/squads/entities":{"get":{"tags":["Squads"],"summary":"Get Squads","description":"Get paginated list of squads (groups of collaborating agents) with aggregated execution metrics. Squads group multiple executions by their conceptual purpose, enabling consistent tracking even when squad names change.","operationId":"list_squads","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Time period for analysis. If not provided, defaults to THIRTY_DAYS.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["lastExecutionTime,DESC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Returns a paginated list of squad resources.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SquadPagedModel_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SquadPagedModel_Read"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/squads/entities/{squadId}/executions":{"get":{"tags":["Squads"],"summary":"Get Executions for Squad","description":"Get paginated list of executions for a specific squad. Returns individual squad execution instances that belong to the squad.","operationId":"list_executions_by_squad","parameters":[{"name":"squadId","in":"path","description":"Unique identifier for the squad.","required":true,"schema":{"type":"string"},"example":"JMwX9g4"},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Time period for analysis. If not provided, defaults to THIRTY_DAYS.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["startTime,DESC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Returns a paginated list of squad execution resources.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SquadExecutionListPagedModel_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SquadExecutionListPagedModel_Read"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Squad not found.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/sources/{id}/changelogs":{"get":{"tags":["Sources"],"summary":"Get Source Audit History","description":"Retrieves the audit history for a specific source with pagination.","operationId":"get_source_audit_history","parameters":[{"name":"id","in":"path","description":"The source id","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Successfully retrieved audit history","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionDataPagedModel_Read"},"examples":{"Source Audit History":{"description":"Source Audit History","value":{"_embedded":{"revisionDataResourceList":[{"changeDate":"2025-10-17T17:53:39.342Z","user":"user@example.com","field":"products","previousValue":"[Default AI Product, prod-ai-assistant]","currentValue":"[Default AI Product, prod-ai-assistant, product-789]","changeType":"UPDATE","attribute":"var io.hypercurrent.profitstream.model.entity.Asset.products: kotlin.collections.MutableSet<io.hypercurrent.profitstream.model.entity.Product>"},{"changeDate":"2025-10-16T19:03:33.001Z","user":"user@example.com","field":"products","previousValue":"[Default AI Product, prod-ai-assistant, product-789]","currentValue":"[Default AI Product, prod-ai-assistant]","changeType":"UPDATE","attribute":"var io.hypercurrent.profitstream.model.entity.Asset.products: kotlin.collections.MutableSet<io.hypercurrent.profitstream.model.entity.Product>"}]},"page":{"size":20,"totalElements":3,"totalPages":2,"number":0}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/RevisionDataPagedModel_Read"},"examples":{"Source Audit History":{"description":"Source Audit History","value":{"_embedded":{"revisionDataResourceList":[{"changeDate":"2025-10-17T17:53:39.342Z","user":"user@example.com","field":"products","previousValue":"[Default AI Product, prod-ai-assistant]","currentValue":"[Default AI Product, prod-ai-assistant, product-789]","changeType":"UPDATE","attribute":"var io.hypercurrent.profitstream.model.entity.Asset.products: kotlin.collections.MutableSet<io.hypercurrent.profitstream.model.entity.Product>"},{"changeDate":"2025-10-16T19:03:33.001Z","user":"user@example.com","field":"products","previousValue":"[Default AI Product, prod-ai-assistant, product-789]","currentValue":"[Default AI Product, prod-ai-assistant]","changeType":"UPDATE","attribute":"var io.hypercurrent.profitstream.model.entity.Asset.products: kotlin.collections.MutableSet<io.hypercurrent.profitstream.model.entity.Product>"}]},"page":{"size":20,"totalElements":3,"totalPages":2,"number":0}}}}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - user is not authorized to view the source","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Source not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/sources/metrics/tool/events":{"get":{"tags":["Tool Event Metrics"],"summary":"List tool event logs","description":"\n            Returns a paginated list of tool event line items for the specified team.\n            Tool events represent tool/function calls that have been processed through the metering pipeline.\n\n            Supports filtering by date range, tool ID, tool name, tool type, operation,\n            transaction ID, product, and charge amount.\n\n            Results are sorted by timestamp descending by default.\n        ","operationId":"listToolEvents","parameters":[{"name":"query","in":"query","description":"For UUID terms, searches transaction ID by exact match first; when no ID matches, falls back to partial match across tool name, tool ID and resource/operation.","required":false,"schema":{"type":"string"},"example":"web search"},{"name":"startDate","in":"query","description":"Filter start date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter start date/time in ISO 8601 format.","example":"2025-09-01T00:00:00Z","maxLength":255,"minLength":0,"writeOnly":true},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"Filter end date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter end date/time in ISO 8601 format.","example":"2025-09-01T00:00:00Z","maxLength":255,"minLength":0,"writeOnly":true},"example":"2025-09-01T00:00:00Z"},{"name":"toolId","in":"query","description":"Filter by tool ID (the tool's external toolId, not the database ID).","required":false,"schema":{"type":"string","description":"Filter by tool ID (the tool's external toolId, not the database ID).","example":"search_web","maxLength":255,"minLength":1,"writeOnly":true},"example":"search_web"},{"name":"toolName","in":"query","description":"Filter by tool name.","required":false,"schema":{"type":"string","description":"Filter by tool name.","example":"Web Search Tool","maxLength":255,"minLength":1,"writeOnly":true},"example":"Web Search Tool"},{"name":"toolType","in":"query","description":"Filter by tool type.","required":false,"schema":{"type":"string","description":"Filter by tool type.","enum":["SDK","MCP_SERVER","AI_SERVICE","REST_API","LOCAL_FUNCTION","CUSTOM"],"example":"MCP_SERVER","writeOnly":true},"example":"MCP_SERVER"},{"name":"operation","in":"query","description":"Filter by operation (parsed from the resource field).","required":false,"schema":{"type":"string","description":"Filter by operation (parsed from the resource field).","example":"execute","maxLength":255,"minLength":1,"writeOnly":true},"example":"execute"},{"name":"transactionId","in":"query","description":"Exact transaction ID match.","required":false,"schema":{"type":"string","description":"Exact transaction ID match.","example":"123e4567-e89b-12d3-a456-426614174000","maxLength":255,"minLength":1,"writeOnly":true},"example":"123e4567-e89b-12d3-a456-426614174000"},{"name":"productId","in":"query","description":"Filter by product ID.","required":false,"schema":{"type":"string","description":"Filter by product ID.","example":"kB17z94","maxLength":255,"minLength":1,"writeOnly":true},"example":"kB17z94"},{"name":"chargeMin","in":"query","description":"Minimum charge amount ($).","required":false,"schema":{"type":"string","description":"Minimum charge amount ($).","example":0.01,"maximum":999999.99,"minimum":0,"writeOnly":true},"example":0.01},{"name":"chargeMax","in":"query","description":"Maximum charge amount ($).","required":false,"schema":{"type":"string","description":"Maximum charge amount ($).","example":5,"maximum":999999.99,"minimum":0,"writeOnly":true},"example":5},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["timestamp,DESC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Returns a paginated list of tool event line items.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolEventPagedModel_Read"},"examples":{"Tool Event":{"description":"Tool Event","value":{"id":"l3Ka8j","resourceType":"tool_event","transactionId":"123e4567-e89b-12d3-a456-426614174000","toolId":"search_web","toolName":"Web Search Tool","toolType":"MCP_SERVER","toolProvider":"anthropic","operation":"execute","charge":0.05,"currency":"USD","costUsd":0.05,"callCount":1,"resource":"tool:search_web:execute","timestamp":"2025-10-17T17:35:00Z","created":"2025-10-17T17:35:03Z"}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ToolEventPagedModel_Read"},"examples":{"Tool Event":{"description":"Tool Event","value":{"id":"l3Ka8j","resourceType":"tool_event","transactionId":"123e4567-e89b-12d3-a456-426614174000","toolId":"search_web","toolName":"Web Search Tool","toolType":"MCP_SERVER","toolProvider":"anthropic","operation":"execute","charge":0.05,"currency":"USD","costUsd":0.05,"callCount":1,"resource":"tool:search_web:execute","timestamp":"2025-10-17T17:35:00Z","created":"2025-10-17T17:35:03Z"}}}}}},"400":{"description":"Invalid request parameters or validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Entity - Validation failed (e.g. constraint violations on filter parameters)","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/sources/metrics/ai":{"get":{"tags":["AI Metrics"],"summary":"List all AI metrics across all modalities","description":"\n            Returns a paginated list of AI metrics across all types (completion, audio, video, image).\n            Only common fields are returned. Use the metricType field to identify the specific type.\n            For full type-specific details, use the dedicated endpoints:\n            - /v2/api/sources/metrics/ai/completions\n            - /v2/api/sources/metrics/ai/audio\n            - /v2/api/sources/metrics/ai/video\n            - /v2/api/sources/metrics/ai/images\n        ","operationId":"list_all_ai_metrics","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"query","in":"query","description":"Searches trace ID and transaction ID by exact match first; when no ID matches, falls back to partial match across agent, model, provider, error reason and subscriber email.","required":false,"schema":{"type":"string"},"example":"gpt-4o"},{"name":"metricType","in":"query","description":"Filter by metric type (modality). If not specified, returns all types.","required":false,"schema":{"type":"string","description":"Filter by metric type (modality). If not specified, returns all types.","enum":["COMPLETION","IMAGE","AUDIO","VIDEO"],"example":"COMPLETION"},"example":"COMPLETION"},{"name":"startDate","in":"query","description":"Filter start date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter start date/time in ISO 8601 format.","example":"2025-09-01T00:00:00Z"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"Filter end date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter end date/time in ISO 8601 format.","example":"2025-09-30T23:59:59Z"},"example":"2025-09-30T23:59:59Z"},{"name":"requestDurationMin","in":"query","description":"Minimum request duration (in milliseconds).","required":false,"schema":{"type":"integer","format":"int64","description":"Minimum request duration (in milliseconds).","example":500,"maximum":300000,"minimum":0},"example":500},{"name":"requestDurationMax","in":"query","description":"Maximum request duration (in milliseconds).","required":false,"schema":{"type":"integer","format":"int64","description":"Maximum request duration (in milliseconds).","example":10000,"maximum":300000,"minimum":0},"example":10000},{"name":"totalCostMin","in":"query","description":"Minimum total cost ($).","required":false,"schema":{"type":"number","description":"Minimum total cost ($).","example":0.1,"maximum":999999.99,"minimum":0},"example":0.1},{"name":"totalCostMax","in":"query","description":"Maximum total cost ($).","required":false,"schema":{"type":"number","description":"Maximum total cost ($).","example":5,"maximum":999999.99,"minimum":0},"example":5},{"name":"transactionId","in":"query","description":"Exact transaction ID match.","required":false,"schema":{"type":"string","description":"Exact transaction ID match.","example":"123e4567-e89b-12d3-a456-426614174000","maxLength":255,"minLength":1},"example":"123e4567-e89b-12d3-a456-426614174000"},{"name":"traceId","in":"query","description":"Exact trace ID match.","required":false,"schema":{"type":"string","description":"Exact trace ID match.","example":"fedcba98-7654-3210-fedc-ba9876543210","maxLength":255,"minLength":1},"example":"fedcba98-7654-3210-fedc-ba9876543210"},{"name":"traceType","in":"query","description":"Filter by trace type. Use 'unknown' for metrics without traceType.","required":false,"schema":{"type":"string","description":"Filter by trace type. Use 'unknown' for metrics without traceType.","example":"document_analysis","maxLength":255,"minLength":1},"example":"document_analysis"},{"name":"organizationName","in":"query","description":"Filter by consuming organization name.","required":false,"schema":{"type":"string","description":"Filter by consuming organization name.","example":"Test Customer","maxLength":255,"minLength":1},"example":"Test Customer"},{"name":"subscriberId","in":"query","description":"Filter by subscriber ID.","required":false,"schema":{"type":"string","description":"Filter by subscriber ID.","example":"sub_123abc","maxLength":255,"minLength":1},"example":"sub_123abc"},{"name":"subscriberEmail","in":"query","description":"Filter by subscriber email.","required":false,"schema":{"type":"string","description":"Filter by subscriber email.","example":"user@example.com","maxLength":255,"minLength":1},"example":"user@example.com"},{"name":"subscriptionId","in":"query","description":"Filter by subscription ID.","required":false,"schema":{"type":"string","description":"Filter by subscription ID.","example":"subscription_456def","maxLength":255,"minLength":1},"example":"subscription_456def"},{"name":"productId","in":"query","description":"Filter by product ID.","required":false,"schema":{"type":"string","description":"Filter by product ID.","example":"kB17z94","maxLength":255,"minLength":1},"example":"kB17z94"},{"name":"agent","in":"query","description":"Filter by agent name.","required":false,"schema":{"type":"string","description":"Filter by agent name.","example":"openai-basic-embeddings-node","maxLength":255,"minLength":1},"example":"openai-basic-embeddings-node"},{"name":"provider","in":"query","description":"Filter by AI provider.","required":false,"schema":{"type":"string","description":"Filter by AI provider.","example":"OPENAI","maxLength":255,"minLength":1},"example":"OPENAI"},{"name":"model","in":"query","description":"Filter by AI model.","required":false,"schema":{"type":"string","description":"Filter by AI model.","example":"gpt-4o-mini-2024-07-18","maxLength":255,"minLength":1},"example":"gpt-4o-mini-2024-07-18"},{"name":"modelSource","in":"query","description":"Filter by model source.","required":false,"schema":{"type":"string","description":"Filter by model source.","example":"OPENAI","maxLength":255,"minLength":1},"example":"OPENAI"},{"name":"errorReason","in":"query","description":"Filter by error reason.","required":false,"schema":{"type":"string","description":"Filter by error reason.","example":"UNRECOGNIZED_RESPONSE","maxLength":255,"minLength":1},"example":"UNRECOGNIZED_RESPONSE"},{"name":"operationType","in":"query","description":"Filter by operation type.","required":false,"schema":{"type":"string","description":"Filter by operation type.","enum":["CHAT","GENERATE","EMBED","CLASSIFY","SUMMARIZE","TRANSLATE","OTHER","TOOL_CALL","RERANK","SEARCH","MODERATION","VISION","TRANSFORM","GUARDRAIL","AUDIO","VIDEO","IMAGE"],"example":"CHAT"},"example":"CHAT"},{"name":"environment","in":"query","description":"Filter by deployment environment.","required":false,"schema":{"type":"string","description":"Filter by deployment environment.","enum":["production","staging","development","test"],"example":"production","maxLength":50,"minLength":1},"example":"production"},{"name":"billingSkipped","in":"query","description":"Filter by whether billing was skipped (true = free tier/skipped, false = billed).","required":false,"schema":{"type":"boolean","description":"Filter by whether billing was skipped (true = free tier/skipped, false = billed).","example":false},"example":false},{"name":"includeCodingAssistants","in":"query","description":"Whether to include coding assistant metrics (e.g. Claude Code, Gemini CLI). When false (default), coding assistant records are excluded from results. Non-completion metrics (IMAGE, AUDIO, VIDEO) are unaffected by this filter.","required":false,"schema":{"type":"boolean","description":"Whether to include coding assistant metrics (e.g. Claude Code, Gemini CLI). When false (default), coding assistant records are excluded from results. Non-completion metrics (IMAGE, AUDIO, VIDEO) are unaffected by this filter.","example":false},"example":false},{"name":"includeCodingAssistantProviders","in":"query","description":"Server-side coding assistant provider pricing policy. Accepted values: ClaudeCode, ClaudeCowork, CursorIde, GeminiCli, CodexCli, GithubCopilot. Providers in this list are treated as API-rate real spend and included on real-cost surfaces. An empty or omitted list treats coding assistant providers as subscription or seat-based usage and excludes them from real-cost defaults.","required":false,"schema":{"type":"array","description":"Server-side coding assistant provider pricing policy. Accepted values: ClaudeCode, ClaudeCowork, CursorIde, GeminiCli, CodexCli, GithubCopilot. Providers in this list are treated as API-rate real spend and included on real-cost surfaces. An empty or omitted list treats coding assistant providers as subscription or seat-based usage and excludes them from real-cost defaults.","example":["ClaudeCode","GeminiCli"],"items":{"type":"string","description":"Server-side coding assistant provider pricing policy. Accepted values: ClaudeCode, ClaudeCowork, CursorIde, GeminiCli, CodexCli, GithubCopilot. Providers in this list are treated as API-rate real spend and included on real-cost surfaces. An empty or omitted list treats coding assistant providers as subscription or seat-based usage and excludes them from real-cost defaults.","example":["ClaudeCode","GeminiCli"]}},"example":["ClaudeCode","GeminiCli"]},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["requestTime,DESC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Returns a paginated list of AI metrics across all modalities.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIMetricPagedModel_Read"},"examples":{"AI Metrics List":{"description":"AI Metrics List","value":{"_embedded":{"aIMetricResourceList":[{"id":"l3Ka8j","resourceType":"ai_metric","metricType":"COMPLETION","label":"txn-test-001","created":"2025-10-17T17:53:39.119Z","transactionId":"txn-test-001","model":"gpt-4o","provider":"OpenAI","totalCost":0.0021,"requestTime":"2025-10-17T17:35:00Z","responseTime":"2025-10-17T17:35:03Z","requestDuration":3000},{"id":"k2Jb7h","resourceType":"ai_metric","metricType":"AUDIO","label":"txn-audio-001","created":"2025-10-17T18:00:00.000Z","transactionId":"txn-audio-001","model":"whisper-1","provider":"OpenAI","totalCost":0.006,"requestTime":"2025-10-17T18:00:00Z","responseTime":"2025-10-17T18:00:05Z","requestDuration":5000}]},"page":{"size":20,"totalElements":2,"totalPages":1,"number":0}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AIMetricPagedModel_Read"},"examples":{"AI Metrics List":{"description":"AI Metrics List","value":{"_embedded":{"aIMetricResourceList":[{"id":"l3Ka8j","resourceType":"ai_metric","metricType":"COMPLETION","label":"txn-test-001","created":"2025-10-17T17:53:39.119Z","transactionId":"txn-test-001","model":"gpt-4o","provider":"OpenAI","totalCost":0.0021,"requestTime":"2025-10-17T17:35:00Z","responseTime":"2025-10-17T17:35:03Z","requestDuration":3000},{"id":"k2Jb7h","resourceType":"ai_metric","metricType":"AUDIO","label":"txn-audio-001","created":"2025-10-17T18:00:00.000Z","transactionId":"txn-audio-001","model":"whisper-1","provider":"OpenAI","totalCost":0.006,"requestTime":"2025-10-17T18:00:00Z","responseTime":"2025-10-17T18:00:05Z","requestDuration":5000}]},"page":{"size":20,"totalElements":2,"totalPages":1,"number":0}}}}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - user is not authorized to view the team","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["AI Metrics"],"summary":"Delete multiple AI Metrics","description":"Soft delete multiple AI metric records of any type (completion, audio, video, image). Records will be marked as inactive but retained in the database.","operationId":"bulk_delete_ai_metrics","requestBody":{"description":"List of AI metric IDs to delete","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteRequest"}}},"required":true},"responses":{"200":{"description":"AI Metrics deleted successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteResponse"}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions for one or more metrics","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/{id}":{"get":{"tags":["AI Metrics"],"summary":"Get an AI metric by ID","description":"Returns a single AI metric with common fields only. Use the metricType field to identify the specific type.","operationId":"get_ai_metric","parameters":[{"name":"id","in":"path","description":"Unique identifier of the AI metric. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Returns an AI metric object.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIMetricResource_Read"},"examples":{"AI Metric":{"description":"AI Metric","value":{"id":"l3Ka8j","resourceType":"ai_metric","metricType":"COMPLETION","label":"txn-test-001","created":"2025-10-17T17:53:39.119Z","transactionId":"txn-test-001","model":"gpt-4o","provider":"OpenAI","totalCost":0.0021,"requestTime":"2025-10-17T17:35:00Z","responseTime":"2025-10-17T17:35:03Z","requestDuration":3000,"traceId":"trace-abc-123"}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AIMetricResource_Read"},"examples":{"AI Metric":{"description":"AI Metric","value":{"id":"l3Ka8j","resourceType":"ai_metric","metricType":"COMPLETION","label":"txn-test-001","created":"2025-10-17T17:53:39.119Z","transactionId":"txn-test-001","model":"gpt-4o","provider":"OpenAI","totalCost":0.0021,"requestTime":"2025-10-17T17:35:00Z","responseTime":"2025-10-17T17:35:03Z","requestDuration":3000,"traceId":"trace-abc-123"}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"AI metric not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}},"delete":{"tags":["AI Metrics"],"summary":"Delete an AI Metric","description":"Soft delete an AI metric record of any type (completion, audio, video, image). The record will be marked as inactive but retained in the database.","operationId":"delete_ai_metric","parameters":[{"name":"id","in":"path","description":"Unique identifier of the AI metric to delete. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"AI Metric deleted successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"404":{"description":"AI Metric not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/video":{"get":{"tags":["AI Video Metrics"],"summary":"List AI Video Metrics by team","description":"\n            Retrieve a paginated list of AI video metrics for a specified team.\n            Includes video-specific fields like duration, resolution, credits consumed, and async operation status.\n        ","operationId":"list_ai_video_metrics","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"startDate","in":"query","description":"Filter start date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter start date/time in ISO 8601 format.","example":"2025-09-01T00:00:00Z"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"Filter end date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter end date/time in ISO 8601 format.","example":"2025-09-30T23:59:59Z"},"example":"2025-09-30T23:59:59Z"},{"name":"requestDurationMin","in":"query","description":"Minimum request duration (in milliseconds).","required":false,"schema":{"type":"integer","format":"int64","description":"Minimum request duration (in milliseconds).","example":500,"maximum":300000,"minimum":0},"example":500},{"name":"requestDurationMax","in":"query","description":"Maximum request duration (in milliseconds).","required":false,"schema":{"type":"integer","format":"int64","description":"Maximum request duration (in milliseconds).","example":10000,"maximum":300000,"minimum":0},"example":10000},{"name":"totalCostMin","in":"query","description":"Minimum total cost ($).","required":false,"schema":{"type":"number","description":"Minimum total cost ($).","example":0.1,"maximum":999999.99,"minimum":0},"example":0.1},{"name":"totalCostMax","in":"query","description":"Maximum total cost ($).","required":false,"schema":{"type":"number","description":"Maximum total cost ($).","example":5,"maximum":999999.99,"minimum":0},"example":5},{"name":"transactionId","in":"query","description":"Exact transaction ID match.","required":false,"schema":{"type":"string","description":"Exact transaction ID match.","example":"123e4567-e89b-12d3-a456-426614174000","maxLength":255,"minLength":1},"example":"123e4567-e89b-12d3-a456-426614174000"},{"name":"traceId","in":"query","description":"Exact trace ID match.","required":false,"schema":{"type":"string","description":"Exact trace ID match.","example":"fedcba98-7654-3210-fedc-ba9876543210","maxLength":255,"minLength":1},"example":"fedcba98-7654-3210-fedc-ba9876543210"},{"name":"traceType","in":"query","description":"Filter by trace type. Use 'unknown' for metrics without traceType.","required":false,"schema":{"type":"string","description":"Filter by trace type. Use 'unknown' for metrics without traceType.","example":"video_generation","maxLength":255,"minLength":1},"example":"video_generation"},{"name":"organizationName","in":"query","description":"Filter by consuming organization name.","required":false,"schema":{"type":"string","description":"Filter by consuming organization name.","example":"Test Customer","maxLength":255,"minLength":1},"example":"Test Customer"},{"name":"subscriberId","in":"query","description":"Filter by subscriber ID.","required":false,"schema":{"type":"string","description":"Filter by subscriber ID.","example":"sub_123abc","maxLength":255,"minLength":1},"example":"sub_123abc"},{"name":"subscriberEmail","in":"query","description":"Filter by subscriber email.","required":false,"schema":{"type":"string","description":"Filter by subscriber email.","example":"user@example.com","maxLength":255,"minLength":1},"example":"user@example.com"},{"name":"subscriptionId","in":"query","description":"Filter by subscription ID.","required":false,"schema":{"type":"string","description":"Filter by subscription ID.","example":"subscription_456def","maxLength":255,"minLength":1},"example":"subscription_456def"},{"name":"productId","in":"query","description":"Filter by product ID.","required":false,"schema":{"type":"string","description":"Filter by product ID.","example":"kB17z94","maxLength":255,"minLength":1},"example":"kB17z94"},{"name":"agent","in":"query","description":"Filter by agent name.","required":false,"schema":{"type":"string","description":"Filter by agent name.","example":"video-gen-agent","maxLength":255,"minLength":1},"example":"video-gen-agent"},{"name":"provider","in":"query","description":"Filter by AI provider.","required":false,"schema":{"type":"string","description":"Filter by AI provider.","example":"RUNWAY","maxLength":255,"minLength":1},"example":"RUNWAY"},{"name":"model","in":"query","description":"Filter by AI model.","required":false,"schema":{"type":"string","description":"Filter by AI model.","example":"gen-3","maxLength":255,"minLength":1},"example":"gen-3"},{"name":"modelSource","in":"query","description":"Filter by model source.","required":false,"schema":{"type":"string","description":"Filter by model source.","example":"RUNWAY","maxLength":255,"minLength":1},"example":"RUNWAY"},{"name":"errorReason","in":"query","description":"Filter by error reason.","required":false,"schema":{"type":"string","description":"Filter by error reason.","example":"CONTENT_POLICY_VIOLATION","maxLength":255,"minLength":1},"example":"CONTENT_POLICY_VIOLATION"},{"name":"operationSubtype","in":"query","description":"Filter by operation subtype.","required":false,"schema":{"type":"string","description":"Filter by operation subtype.","enum":["generation","upscale","extend","edit"],"example":"generation","maxLength":50,"minLength":1},"example":"generation"},{"name":"environment","in":"query","description":"Filter by deployment environment.","required":false,"schema":{"type":"string","description":"Filter by deployment environment.","enum":["production","staging","development","test"],"example":"production","maxLength":50,"minLength":1},"example":"production"},{"name":"billingSkipped","in":"query","description":"Filter by whether billing was skipped.","required":false,"schema":{"type":"boolean","description":"Filter by whether billing was skipped.","example":false},"example":false},{"name":"durationSecondsMin","in":"query","description":"Minimum video duration (in seconds).","required":false,"schema":{"type":"number","format":"double","description":"Minimum video duration (in seconds).","example":1,"maximum":3600,"minimum":0},"example":1},{"name":"durationSecondsMax","in":"query","description":"Maximum video duration (in seconds).","required":false,"schema":{"type":"number","format":"double","description":"Maximum video duration (in seconds).","example":60,"maximum":3600,"minimum":0},"example":60},{"name":"fps","in":"query","description":"Filter by frames per second.","required":false,"schema":{"type":"integer","format":"int32","description":"Filter by frames per second.","example":30,"maximum":120,"minimum":1},"example":30},{"name":"resolution","in":"query","description":"Filter by video resolution.","required":false,"schema":{"type":"string","description":"Filter by video resolution.","enum":["480p","720p","1080p","4k"],"example":"1080p","maxLength":20,"minLength":1},"example":"1080p"},{"name":"creditsConsumedMin","in":"query","description":"Minimum credits consumed.","required":false,"schema":{"type":"number","format":"double","description":"Minimum credits consumed.","example":1,"maximum":10000,"minimum":0},"example":1},{"name":"creditsConsumedMax","in":"query","description":"Maximum credits consumed.","required":false,"schema":{"type":"number","format":"double","description":"Maximum credits consumed.","example":100,"maximum":10000,"minimum":0},"example":100},{"name":"creditRateMin","in":"query","description":"Minimum credit rate.","required":false,"schema":{"type":"number","format":"double","description":"Minimum credit rate.","example":0.5,"maximum":100,"minimum":0},"example":0.5},{"name":"creditRateMax","in":"query","description":"Maximum credit rate.","required":false,"schema":{"type":"number","format":"double","description":"Maximum credit rate.","example":5,"maximum":100,"minimum":0},"example":5},{"name":"asyncOperation","in":"query","description":"Filter by async operation flag.","required":false,"schema":{"type":"boolean","description":"Filter by async operation flag.","example":true},"example":true},{"name":"completionStatus","in":"query","description":"Filter by completion status.","required":false,"schema":{"type":"string","description":"Filter by completion status.","enum":["SUCCESS","PARTIAL_TIMEOUT","FAILED"],"example":"SUCCESS"},"example":"SUCCESS"},{"name":"priorityTier","in":"query","description":"Filter by priority tier.","required":false,"schema":{"type":"string","description":"Filter by priority tier.","example":"standard","maxLength":50,"minLength":1},"example":"standard"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["requestTime,DESC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Returns a paginated list of AI Video Metric objects.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIVideoMetricPagedModel_Read"},"examples":{"AI Video Metrics List":{"description":"AI Video Metrics List","value":{"_embedded":{"aIVideoMetricResourceList":[{"id":"v3Ka8j","resourceType":"ai.video.metric","label":"txn-video-001","created":"2025-10-17T17:53:39.119Z","transactionId":"txn-video-001","model":"gen-3","provider":"RunwayML","totalCost":0.5,"requestTime":"2025-10-17T17:35:00Z","responseTime":"2025-10-17T17:35:30Z","requestDuration":30000,"durationSeconds":10,"fps":30,"resolution":"1080p","creditsConsumed":10,"asyncOperation":false,"completionStatus":"SUCCESS"}]},"page":{"size":20,"totalElements":1,"totalPages":1,"number":0}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AIVideoMetricPagedModel_Read"},"examples":{"AI Video Metrics List":{"description":"AI Video Metrics List","value":{"_embedded":{"aIVideoMetricResourceList":[{"id":"v3Ka8j","resourceType":"ai.video.metric","label":"txn-video-001","created":"2025-10-17T17:53:39.119Z","transactionId":"txn-video-001","model":"gen-3","provider":"RunwayML","totalCost":0.5,"requestTime":"2025-10-17T17:35:00Z","responseTime":"2025-10-17T17:35:30Z","requestDuration":30000,"durationSeconds":10,"fps":30,"resolution":"1080p","creditsConsumed":10,"asyncOperation":false,"completionStatus":"SUCCESS"}]},"page":{"size":20,"totalElements":1,"totalPages":1,"number":0}}}}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - user is not authorized to view the team","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/video/{id}":{"get":{"tags":["AI Video Metrics"],"summary":"Get an AI Video Metric by ID","description":"Returns a single AI video metric with all video-specific fields.","operationId":"get_ai_video_metric","parameters":[{"name":"id","in":"path","description":"Unique identifier of the AI video metric. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Returns an AI Video Metric object.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIVideoMetricResource_Read"},"examples":{"AI Video Metric":{"description":"AI Video Metric","value":{"id":"v3Ka8j","resourceType":"ai.video.metric","label":"txn-video-001","created":"2025-10-17T17:53:39.119Z","transactionId":"txn-video-001","model":"gen-3","provider":"RunwayML","totalCost":0.5,"requestTime":"2025-10-17T17:35:00Z","responseTime":"2025-10-17T17:35:30Z","requestDuration":30000,"durationSeconds":10,"fps":30,"resolution":"1080p","creditsConsumed":10,"videoJobId":"job-12345-abcde","requestedDurationSeconds":15,"creditRate":1,"asyncOperation":false,"completionStatus":"SUCCESS","priorityTier":"standard"}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AIVideoMetricResource_Read"},"examples":{"AI Video Metric":{"description":"AI Video Metric","value":{"id":"v3Ka8j","resourceType":"ai.video.metric","label":"txn-video-001","created":"2025-10-17T17:53:39.119Z","transactionId":"txn-video-001","model":"gen-3","provider":"RunwayML","totalCost":0.5,"requestTime":"2025-10-17T17:35:00Z","responseTime":"2025-10-17T17:35:30Z","requestDuration":30000,"durationSeconds":10,"fps":30,"resolution":"1080p","creditsConsumed":10,"videoJobId":"job-12345-abcde","requestedDurationSeconds":15,"creditRate":1,"asyncOperation":false,"completionStatus":"SUCCESS","priorityTier":"standard"}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"AI video metric not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/sources/metrics/ai/traces":{"get":{"tags":["AI Traces"],"summary":"Get AI Traces","description":"Get aggregated AI trace metrics grouped by traceId. Each trace represents multiple AI completion transactions grouped together by a common trace identifier. Traces can be filtered by date range, trace properties, cost, and duration.","operationId":"list_ai_traces","parameters":[{"name":"traceId","in":"query","description":"Exact trace ID match. Use this to retrieve a specific trace.","required":false,"schema":{"type":"string","description":"Exact trace ID match. Use this to retrieve a specific trace.","example":"fedcba98-7654-3210-fedc-ba9876543210","maxLength":255,"minLength":1},"example":"fedcba98-7654-3210-fedc-ba9876543210"},{"name":"traceType","in":"query","description":"Filter by trace type category (exact match).","required":false,"schema":{"type":"string","description":"Filter by trace type category (exact match).","example":"document_analysis","maxLength":255,"minLength":1},"example":"document_analysis"},{"name":"traceName","in":"query","description":"Filter by trace name (exact match).","required":false,"schema":{"type":"string","description":"Filter by trace name (exact match).","example":"Marketing Video Q4 2025","maxLength":255,"minLength":1},"example":"Marketing Video Q4 2025"},{"name":"totalCostMin","in":"query","description":"Minimum total cost filter. Returns traces with totalCost >= this value.","required":false,"schema":{"type":"string","description":"Minimum total cost filter. Returns traces with totalCost >= this value.","example":0.5,"maximum":999999.99,"minimum":0},"example":0.5},{"name":"totalCostMax","in":"query","description":"Maximum total cost filter. Returns traces with totalCost <= this value.","required":false,"schema":{"type":"string","description":"Maximum total cost filter. Returns traces with totalCost <= this value.","example":10,"maximum":999999.99,"minimum":0},"example":10},{"name":"minDuration","in":"query","description":"Minimum trace duration in milliseconds. Returns traces with traceDuration >= this value.","required":false,"schema":{"type":"integer","format":"int64","description":"Minimum trace duration in milliseconds. Returns traces with traceDuration >= this value.","example":30000,"maximum":300000,"minimum":0},"example":30000},{"name":"maxDuration","in":"query","description":"Maximum trace duration in milliseconds. Returns traces with traceDuration <= this value.","required":false,"schema":{"type":"integer","format":"int64","description":"Maximum trace duration in milliseconds. Returns traces with traceDuration <= this value.","example":300000,"maximum":300000,"minimum":0},"example":300000},{"name":"environment","in":"query","description":"Filter by environment (exact match).","required":false,"schema":{"type":"string","description":"Filter by environment (exact match).","example":"production","maxLength":255,"minLength":1},"example":"production"},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Time period for analysis (e.g., THIRTY_DAYS, SEVEN_DAYS). Defaults to THIRTY_DAYS if not provided.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"THIRTY_DAYS"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["startTime,DESC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Returns a paginated list of AI trace metrics.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AITracePagedModel_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AITracePagedModel_Read"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/traces/{traceId}":{"get":{"tags":["AI Traces"],"summary":"Get AI Trace Detail by ID","description":"Get detailed information for a specific AI trace including all aggregated metrics, context fields (taskTypes, subscriberEmail, organizationName, productName), and top 5 breakdowns (cost by model, cost by provider, duration by task type).","operationId":"get_ai_trace_detail","parameters":[{"name":"traceId","in":"path","description":"The unique trace identifier.","required":true,"schema":{"type":"string"},"example":"trace-abc-123"},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"traceType","in":"query","description":"Filter by specific trace type (null for all)","required":false,"schema":{"type":"string"},"example":"chat_completion"}],"responses":{"200":{"description":"Returns detailed AI trace metric information.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AITraceDetailResource_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AITraceDetailResource_Read"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Trace not found.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/traces/{traceId}/critical-path":{"get":{"tags":["AI Traces"],"summary":"Get Critical Path Analysis","description":"Analyzes a distributed trace to find the critical path (longest chain of dependent transactions), bottleneck transactions, and optimization potential. The critical path determines the minimum possible trace duration.","operationId":"get_critical_path","parameters":[{"name":"traceId","in":"path","description":"The unique trace identifier to analyze.","required":true,"schema":{"type":"string"},"example":"trace-abc-123"},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"traceType","in":"query","description":"Filter by specific trace type (null for all)","required":false,"schema":{"type":"string"},"example":"chat_completion"}],"responses":{"200":{"description":"Returns critical path analysis with path details, bottlenecks, and optimization info.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CriticalPathResponse"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/CriticalPathResponse"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Team or trace not found.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/traces/user":{"get":{"tags":["AI Completion Metrics"],"summary":"Get User Metrics Over Time","description":"Retrieve usage metrics grouped by user email over time for the UserUsageOverTimeChart component in the Claude Code dashboard","operationId":"get_trace_user_metrics_over_time","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results. Defaults to THIRTY_DAYS.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"THIRTY_DAYS"},{"name":"agent","in":"query","description":"Optional agent filter. Use to filter by specific agent (e.g., 'claude-code' for Claude Code metrics). Omit to include all agents.","required":false,"schema":{"type":"string"},"example":"claude-code"},{"name":"start","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with end. When both are provided, the period parameter is ignored.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"end","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with start. When both are provided, the period parameter is ignored.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"}],"responses":{"200":{"description":"Returns user metrics over time with request count, total cost, and total tokens per user","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserMetricsOverTimeResponse_Read"}},"examples":{"User Metrics Over Time":{"description":"User Metrics Over Time","value":[{"startTimestamp":1704067200000,"endTimestamp":1704153600000,"groups":[{"userEmail":"alice@example.com","metrics":{"requestCount":45,"totalCost":12.5,"totalTokens":15000}},{"userEmail":"bob@example.com","metrics":{"requestCount":30,"totalCost":8.25,"totalTokens":10500}}]}]}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/traces/tokens":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Token Metrics Over Time","description":"Retrieve token usage metrics over time (input, output, cache read tokens) for the TokenUsageOverTimeChart component in the Claude Code dashboard","operationId":"get_trace_tokens_over_time","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results. Defaults to THIRTY_DAYS.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"THIRTY_DAYS"},{"name":"agent","in":"query","description":"Optional agent filter. Use to filter by specific agent (e.g., 'claude-code' for Claude Code metrics). Omit to include all agents.","required":false,"schema":{"type":"string"},"example":"claude-code"},{"name":"start","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with end. When both are provided, the period parameter is ignored.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"end","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with start. When both are provided, the period parameter is ignored.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"}],"responses":{"200":{"description":"Returns token metrics over time with input, output, and cache read token counts","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceTokensOverTimeResponse_Read"},"examples":{"Token Metrics Over Time":{"description":"Token Metrics Over Time","value":[{"startTimestamp":1704067200000,"endTimestamp":1704153600000,"groups":[{"groupName":"INPUT_TOKENS","metrics":[{"startTimestamp":1704067200000,"endTimestamp":1704153600000,"metricType":"INPUT_TOKENS","metricResult":15000}]},{"groupName":"OUTPUT_TOKENS","metrics":[{"startTimestamp":1704067200000,"endTimestamp":1704153600000,"metricType":"OUTPUT_TOKENS","metricResult":8500}]},{"groupName":"CACHE_READ_TOKENS","metrics":[{"startTimestamp":1704067200000,"endTimestamp":1704153600000,"metricType":"CACHE_READ_TOKENS","metricResult":12000}]}]}]}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/traces/performance-over-time":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Performance By Trace Type Over Time","description":"Retrieve average duration (performance) metrics by trace type over time for chart visualization","operationId":"get_performance_by_trace_type_over_time","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results. Defaults to THIRTY_DAYS.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"THIRTY_DAYS"},{"name":"traceType","in":"query","description":"Optional trace type filter. Omit to include all trace types.","required":false,"schema":{"type":"string"},"example":"authentication-flow"},{"name":"environment","in":"query","description":"Optional environment filter (e.g., production, staging). Omit to include all environments.","required":false,"schema":{"type":"string"},"example":"production"}],"responses":{"200":{"description":"Returns trace type performance metrics over time","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceTypeMetricsOverTimeResponse"},"examples":{"Trace Performance Over Time":{"description":"Trace Performance Over Time","value":[{"startTimestamp":1761057106116,"endTimestamp":1761143505116,"groups":[{"groupName":"authentication-flow","metrics":[{"startTimestamp":1761057106116,"endTimestamp":1761143505116,"traceType":"authentication-flow","metricResult":1234.56,"metricType":"PERFORMANCE_BY_TRACE_TYPE_OVER_TIME"}]}]}]}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/traces/performance-by-type":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Performance Metrics By Trace Type","description":"Retrieve paginated list of performance metrics grouped by trace type for table display","operationId":"get_performance_metrics_by_trace_type","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results. Defaults to THIRTY_DAYS.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"THIRTY_DAYS"},{"name":"traceType","in":"query","description":"Optional filter for a specific trace type. Omit to include all trace types.","required":false,"schema":{"type":"string"},"example":"authentication-flow"},{"name":"environment","in":"query","description":"Optional environment filter (e.g., production, staging). Omit to include all environments.","required":false,"schema":{"type":"string"},"example":"production"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["traceType,ASC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Returns paginated performance metrics per trace type","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceTypePerformanceMetrics"},"examples":{"Trace Type Performance Metrics":{"description":"Trace Type Performance Metrics","value":{"content":[{"traceType":"authentication-flow","averageDuration":1234.56,"p95Duration":2345.67,"p99Duration":3456.78},{"traceType":"document-analysis","averageDuration":2345.67,"p95Duration":3456.78,"p99Duration":4567.89}],"page":{"size":20,"totalElements":15,"totalPages":1,"number":0}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/traces/organization":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Organization Metrics Over Time","description":"Retrieve usage metrics grouped by consuming organization over time for organization-level filtering in the Claude Code dashboard","operationId":"get_trace_organization_metrics_over_time","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results. Defaults to THIRTY_DAYS.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"THIRTY_DAYS"},{"name":"agent","in":"query","description":"Optional agent filter. Use to filter by specific agent (e.g., 'claude-code' for Claude Code metrics). Omit to include all agents.","required":false,"schema":{"type":"string"},"example":"claude-code"},{"name":"start","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with end. When both are provided, the period parameter is ignored.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"end","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with start. When both are provided, the period parameter is ignored.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"}],"responses":{"200":{"description":"Returns organization metrics over time with request count, total cost, total tokens, and session count per organization","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationMetricsOverTimeResponse_Read"}},"examples":{"Organization Metrics Over Time":{"description":"Organization Metrics Over Time","value":[{"startTimestamp":1704067200000,"endTimestamp":1704153600000,"groups":[{"organizationId":"jR2kmLs","organizationName":"Engineering Team","metrics":{"requestCount":45,"totalCost":12.5,"totalTokens":15000,"sessionCount":8}},{"organizationId":"kS3lmMt","organizationName":"Product Team","metrics":{"requestCount":30,"totalCost":8.25,"totalTokens":10500,"sessionCount":5}}]}]}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/traces/model":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Model Metrics Over Time","description":"Retrieve usage metrics grouped by model name over time for the ModelUsageOverTimeChart component in the Claude Code dashboard","operationId":"get_trace_model_metrics_over_time","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results. Defaults to THIRTY_DAYS.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"THIRTY_DAYS"},{"name":"agent","in":"query","description":"Optional agent filter. Use to filter by specific agent (e.g., 'claude-code' for Claude Code metrics). Omit to include all agents.","required":false,"schema":{"type":"string"},"example":"claude-code"},{"name":"start","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with end. When both are provided, the period parameter is ignored.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"end","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with start. When both are provided, the period parameter is ignored.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"}],"responses":{"200":{"description":"Returns model metrics over time with request count, total cost, and total tokens per model","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ModelMetricsOverTimeResponse_Read"}},"examples":{"Model Metrics Over Time":{"description":"Model Metrics Over Time","value":[{"startTimestamp":1704067200000,"endTimestamp":1704153600000,"groups":[{"modelName":"claude-sonnet-4-20250514","metrics":{"requestCount":100,"totalCost":8.5,"totalTokens":25000}},{"modelName":"claude-opus-4-20250514","metrics":{"requestCount":40,"totalCost":15,"totalTokens":18000}}]}]}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/traces/metrics":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Aggregated Trace Metrics","description":"Retrieve aggregated trace metrics for summary display (total, P95, average, trend)","operationId":"get_trace_metrics","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results. Defaults to THIRTY_DAYS.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"THIRTY_DAYS"},{"name":"traceType","in":"query","description":"Optional trace type filter. Omit to include all trace types.","required":false,"schema":{"type":"string"},"example":"authentication-flow"},{"name":"metricType","in":"query","description":"Optional metric type filter. Use 'cost' for cost metrics only, 'performance' for performance metrics only, 'efficiency' for efficiency metrics only, or omit for all metrics.","required":false,"schema":{"type":"string","enum":["cost","performance","efficiency"]},"example":"cost"},{"name":"operationType","in":"query","description":"Optional operation type filter. Use to filter by specific operation type (e.g., CHAT, GENERATE, AUDIO, VIDEO, IMAGE). Omit to include all operation types.","required":false,"schema":{"type":"string","enum":["CHAT","GENERATE","EMBED","CLASSIFY","SUMMARIZE","TRANSLATE","OTHER","TOOL_CALL","RERANK","SEARCH","MODERATION","VISION","TRANSFORM","GUARDRAIL","AUDIO","VIDEO","IMAGE"]},"example":"CHAT"},{"name":"agent","in":"query","description":"Optional agent filter. Use to filter by specific agent (e.g., 'claude-code' for Claude Code metrics). Omit to include all agents.","required":false,"schema":{"type":"string"},"example":"claude-code"},{"name":"start","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with end. When both are provided, the period parameter is ignored.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"end","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with start. When both are provided, the period parameter is ignored.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"},{"name":"environment","in":"query","description":"Optional environment filter (e.g., production, staging). Omit to include all environments.","required":false,"schema":{"type":"string"},"example":"production"}],"responses":{"200":{"description":"Returns aggregated trace metrics","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceCostMetricsResponse"},"examples":{"Trace Metrics":{"description":"Trace Metrics","value":{"startTimestamp":1761057106116,"endTimestamp":1761143505116,"totalCost":1234.56,"p95Cost":0.7542,"averageCost":0.3456,"trendCost":18.5}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/traces/metrics/user":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Trace Metrics By User","description":"Retrieve usage metrics grouped by user email for the UserUsageTable component in the Claude Code dashboard","operationId":"get_trace_metrics_by_user","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results. Defaults to THIRTY_DAYS.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"THIRTY_DAYS"},{"name":"agent","in":"query","description":"Optional agent filter. Use to filter by specific agent (e.g., 'claude-code' for Claude Code metrics). Omit to include all agents.","required":false,"schema":{"type":"string"},"example":"claude-code"},{"name":"start","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with end. When both are provided, the period parameter is ignored.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"end","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with start. When both are provided, the period parameter is ignored.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"}],"responses":{"200":{"description":"Returns usage metrics grouped by user","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceMetricsByUserResponse_Read"},"examples":{"Trace Metrics by User":{"description":"Trace Metrics by User","value":{"users":[{"userEmail":"user@example.com","requestCount":150,"totalCost":12.5,"totalTokens":50000},{"userEmail":"another@example.com","requestCount":75,"totalCost":6.25,"totalTokens":25000}]}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/traces/metrics/organization":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Trace Metrics By Organization","description":"Retrieve usage metrics grouped by consuming organization for organization-level filtering in the Claude Code dashboard","operationId":"get_trace_metrics_by_organization","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results. Defaults to THIRTY_DAYS.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"THIRTY_DAYS"},{"name":"agent","in":"query","description":"Optional agent filter. Use to filter by specific agent (e.g., 'claude-code' for Claude Code metrics). Omit to include all agents.","required":false,"schema":{"type":"string"},"example":"claude-code"},{"name":"start","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with end. When both are provided, the period parameter is ignored.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"end","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with start. When both are provided, the period parameter is ignored.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"}],"responses":{"200":{"description":"Returns usage metrics grouped by consuming organization","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceMetricsByOrganizationResponse_Read"},"examples":{"Trace Metrics by Organization":{"description":"Trace Metrics by Organization","value":{"organizations":[{"organizationId":"jR2kmLs","organizationName":"Engineering Team","requestCount":1500,"totalCost":125.5,"totalTokens":500000,"sessionCount":50},{"organizationId":"kS3lmMt","organizationName":"Product Team","requestCount":750,"totalCost":62.25,"totalTokens":250000,"sessionCount":25}]}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/traces/metrics/model":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Trace Metrics By Model","description":"Retrieve usage metrics grouped by model for the CostByModelTable component in the Claude Code dashboard","operationId":"get_trace_metrics_by_model","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results. Defaults to THIRTY_DAYS.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"THIRTY_DAYS"},{"name":"agent","in":"query","description":"Optional agent filter. Use to filter by specific agent (e.g., 'claude-code' for Claude Code metrics). Omit to include all agents.","required":false,"schema":{"type":"string"},"example":"claude-code"},{"name":"start","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with end. When both are provided, the period parameter is ignored.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"end","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with start. When both are provided, the period parameter is ignored.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"}],"responses":{"200":{"description":"Returns usage metrics grouped by model","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceMetricsByModelResponse_Read"},"examples":{"Trace Metrics by Model":{"description":"Trace Metrics by Model","value":{"models":[{"modelName":"claude-sonnet-4-20250514","requestCount":100,"totalCost":8.5,"averageCost":0.085,"percentageOfTotal":68},{"modelName":"claude-opus-4-20250514","requestCount":40,"totalCost":4,"averageCost":0.1,"percentageOfTotal":32}]}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/traces/efficiency-over-time":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Efficiency (Transaction Count) By Trace Type Over Time","description":"Retrieve average transaction count per trace by trace type over time for chart visualization. Shows how many API calls each trace makes on average.","operationId":"get_efficiency_by_trace_type_over_time","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results. Defaults to THIRTY_DAYS.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"THIRTY_DAYS"},{"name":"traceType","in":"query","description":"Optional trace type filter. Omit to include all trace types.","required":false,"schema":{"type":"string"},"example":"authentication-flow"},{"name":"environment","in":"query","description":"Optional environment filter (e.g., production, staging). Omit to include all environments.","required":false,"schema":{"type":"string"},"example":"production"}],"responses":{"200":{"description":"Returns trace type efficiency metrics over time","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceTypeMetricsOverTimeResponse"},"examples":{"Trace Efficiency Over Time":{"description":"Trace Efficiency Over Time","value":[{"startTimestamp":1761057106116,"endTimestamp":1761143505116,"groups":[{"groupName":"authentication-flow","metrics":[{"startTimestamp":1761057106116,"endTimestamp":1761143505116,"traceType":"authentication-flow","metricResult":3.45,"metricType":"EFFICIENCY_BY_TRACE_TYPE_OVER_TIME"},{"startTimestamp":1761057106116,"endTimestamp":1761143505116,"traceType":"authentication-flow","metricResult":5,"metricType":"EFFICIENCY_P95_BY_TRACE_TYPE_OVER_TIME"},{"startTimestamp":1761057106116,"endTimestamp":1761143505116,"traceType":"authentication-flow","metricResult":7,"metricType":"EFFICIENCY_P99_BY_TRACE_TYPE_OVER_TIME"}]}]}]}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/traces/efficiency-by-type":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Efficiency Metrics By Trace Type","description":"Retrieve paginated list of efficiency metrics grouped by trace type for table display","operationId":"get_efficiency_metrics_by_trace_type","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results. Defaults to THIRTY_DAYS.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"THIRTY_DAYS"},{"name":"traceType","in":"query","description":"Optional filter for a specific trace type. Omit to include all trace types.","required":false,"schema":{"type":"string"},"example":"authentication-flow"},{"name":"environment","in":"query","description":"Optional environment filter (e.g., production, staging). Omit to include all environments.","required":false,"schema":{"type":"string"},"example":"production"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["traceType,ASC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Returns paginated efficiency metrics per trace type","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceTypeEfficiencyMetrics"},"examples":{"Trace Type Efficiency Metrics":{"description":"Trace Type Efficiency Metrics","value":{"content":[{"traceType":"authentication-flow","averageTransactions":3.45,"p95Transactions":5,"p99Transactions":7,"trendTransactions":12.5,"previousPeriodTransactions":3.07,"transactionsChange":0.38},{"traceType":"document-analysis","averageTransactions":8.23,"p95Transactions":12,"p99Transactions":15,"trendTransactions":-5.2,"previousPeriodTransactions":8.68,"transactionsChange":-0.45}],"page":{"size":20,"totalElements":15,"totalPages":1,"number":0}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/traces/cost-over-time":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Cost By Trace Type Over Time","description":"Retrieve cost metrics by trace type over time for chart visualization","operationId":"get_cost_by_trace_type_over_time","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results. Defaults to THIRTY_DAYS.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"THIRTY_DAYS"},{"name":"traceType","in":"query","description":"Optional trace type filter. Omit to include all trace types.","required":false,"schema":{"type":"string"},"example":"authentication-flow"},{"name":"operationType","in":"query","description":"Optional operation type filter. Use to filter by specific operation type (e.g., CHAT, GENERATE, AUDIO, VIDEO, IMAGE). Omit to include all operation types.","required":false,"schema":{"type":"string","enum":["CHAT","GENERATE","EMBED","CLASSIFY","SUMMARIZE","TRANSLATE","OTHER","TOOL_CALL","RERANK","SEARCH","MODERATION","VISION","TRANSFORM","GUARDRAIL","AUDIO","VIDEO","IMAGE"]},"example":"CHAT"},{"name":"environment","in":"query","description":"Optional environment filter (e.g., production, staging). Omit to include all environments.","required":false,"schema":{"type":"string"},"example":"production"}],"responses":{"200":{"description":"Returns trace type cost metrics over time","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceTypeMetricsOverTimeResponse"},"examples":{"Trace Cost Over Time":{"description":"Trace Cost Over Time","value":[{"startTimestamp":1761057106116,"endTimestamp":1761143505116,"groups":[{"groupName":"authentication-flow","metrics":[{"startTimestamp":1761057106116,"endTimestamp":1761143505116,"traceType":"authentication-flow","metricResult":123.45,"metricType":"COST_BY_TRACE_TYPE_OVER_TIME"}]}]}]}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/traces/cost-by-type":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Cost Metrics By Trace Type","description":"Retrieve paginated list of cost metrics grouped by trace type for table display","operationId":"get_cost_metrics_by_trace_type","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results. Defaults to THIRTY_DAYS.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"THIRTY_DAYS"},{"name":"traceType","in":"query","description":"Optional filter for a specific trace type. Omit to include all trace types.","required":false,"schema":{"type":"string"},"example":"authentication-flow"},{"name":"operationType","in":"query","description":"Optional operation type filter. Use to filter by specific operation type (e.g., CHAT, GENERATE, AUDIO, VIDEO, IMAGE). Omit to include all operation types.","required":false,"schema":{"type":"string","enum":["CHAT","GENERATE","EMBED","CLASSIFY","SUMMARIZE","TRANSLATE","OTHER","TOOL_CALL","RERANK","SEARCH","MODERATION","VISION","TRANSFORM","GUARDRAIL","AUDIO","VIDEO","IMAGE"]},"example":"CHAT"},{"name":"environment","in":"query","description":"Optional environment filter (e.g., production, staging). Omit to include all environments.","required":false,"schema":{"type":"string"},"example":"production"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["traceType,ASC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Returns paginated cost metrics per trace type","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceTypeCostMetrics"},"examples":{"Trace Type Cost Metrics":{"description":"Trace Type Cost Metrics","value":{"content":[{"traceType":"authentication-flow","totalCost":1234.56,"averageCost":0.3456,"p95Cost":0.7542,"p99Cost":0.8956,"trendCost":18.5},{"traceType":"document-analysis","totalCost":2345.67,"averageCost":0.4567,"p95Cost":0.8234,"p99Cost":0.9876,"trendCost":-12.3}],"page":{"size":20,"totalElements":15,"totalPages":1,"number":0}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/traces/circular-patterns":{"get":{"tags":["AI Traces"],"summary":"Get Circular Pattern Analysis","description":"Detects inefficient circular agent communication patterns (A→B→A, A→B→C→A, etc.). Returns paginated patterns with summary including total waste and severity breakdown.","operationId":"get_circular_patterns","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Time period for analysis","required":false,"schema":{"type":"string","default":"THIRTY_DAYS","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"THIRTY_DAYS"},{"name":"traceType","in":"query","description":"Filter by specific trace type (null for all)","required":false,"schema":{"type":"string"},"example":"chat_completion"},{"name":"severity","in":"query","description":"Filter by severity level: critical (4+ hop), major (3-hop), or minor (1-2 hop). Null returns all.","required":false,"schema":{"type":"string"},"example":"critical"},{"name":"environment","in":"query","description":"Optional environment filter (e.g., production, staging). Omit to include all environments.","required":false,"schema":{"type":"string"},"example":"production"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["occurrences,DESC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Returns circular pattern analysis with paginated patterns and summary.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CircularPatternPagedModel"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/CircularPatternPagedModel"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Team not found for the given teamId.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/traces/anomalies":{"get":{"tags":["AI Traces"],"summary":"Get anomalous traces","description":"Returns paginated list of traces that exceed the percentile threshold(s) for one or more metrics. Each row represents a trace that is anomalous for a specific metric. When percentile is not provided, returns anomalies across all percentiles (P75, P95, P99).","operationId":"get_anomalous_traces","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Time period for analysis","required":false,"schema":{"type":"string","default":"THIRTY_DAYS","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"THIRTY_DAYS"},{"name":"traceType","in":"query","description":"Filter by specific trace type (null for all)","required":false,"schema":{"type":"string"},"example":"chat_completion"},{"name":"metricType","in":"query","description":"The metric type to analyze for anomalies. Supply the UPPER_SNAKE_CASE form (e.g. `TOTAL_COST`) — the same form the API returns in responses. The legacy camelCase form (e.g. `totalCost`) is also accepted for backward compatibility.","required":true,"schema":{"type":"string","enum":["TOTAL_COST","TRACE_DURATION","TRANSACTION_COUNT"]},"example":"TOTAL_COST"},{"name":"percentile","in":"query","description":"Percentile threshold to use (P95, P99, or P75). If not provided, returns anomalies for all percentiles.","required":false,"schema":{"type":"string"},"example":"P95"},{"name":"environment","in":"query","description":"Optional environment filter (e.g., production, staging). Omit to include all environments.","required":false,"schema":{"type":"string"},"example":"production"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["startTime,DESC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Returns a paginated list of anomalous traces.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnomalyTableRow"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AnomalyTableRow"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/traces/anomalies/metrics":{"get":{"tags":["AI Traces"],"summary":"Get anomaly counts per percentile","description":"Returns anomaly counts for each percentile threshold (P75, P95, P99) for a specific metric type. An anomaly is a trace where the metric value exceeds the percentile threshold.","operationId":"get_anomaly_metrics","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"metricType","in":"query","description":"The metric type to get anomaly counts for. Supply the UPPER_SNAKE_CASE form (e.g. `TOTAL_COST`) — the same form the API returns in responses. The legacy camelCase form (e.g. `totalCost`) is also accepted for backward compatibility.","required":true,"schema":{"type":"string","enum":["TOTAL_COST","TRACE_DURATION","TRANSACTION_COUNT"]},"example":"TOTAL_COST"},{"name":"period","in":"query","description":"Time period for analysis","required":false,"schema":{"type":"string","default":"THIRTY_DAYS","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"THIRTY_DAYS"},{"name":"traceType","in":"query","description":"Filter by specific trace type (null for all)","required":false,"schema":{"type":"string"},"example":"chat_completion"},{"name":"environment","in":"query","description":"Optional environment filter (e.g., production, staging). Omit to include all environments.","required":false,"schema":{"type":"string"},"example":"production"}],"responses":{"200":{"description":"Returns anomaly counts per percentile for the specified metric type.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PercentileAnomalyCountsResponse"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PercentileAnomalyCountsResponse"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/traces/agent-interactions":{"get":{"tags":["AI Traces"],"summary":"Get Agent Interactions Table","description":"Returns paginated list of agent-to-agent interactions for table display. Each row represents an interaction from one agent to another.","operationId":"get_agent_interactions_table","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Time period for analysis","required":false,"schema":{"type":"string","default":"THIRTY_DAYS","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"THIRTY_DAYS"},{"name":"traceType","in":"query","description":"Filter by specific trace type (null for all)","required":false,"schema":{"type":"string"},"example":"chat_completion"},{"name":"environment","in":"query","description":"Optional environment filter (e.g., production, staging). Omit to include all environments.","required":false,"schema":{"type":"string"},"example":"production"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["callCount,DESC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Returns paginated agent interactions.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentInteractionTablePagedModel"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AgentInteractionTablePagedModel"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/traces/agent-interactions/matrix":{"get":{"tags":["AI Traces"],"summary":"Get Agent Interaction Matrix","description":"Returns agent interaction matrix with paginated agent summaries, interactions between agents, and metadata. Used for heatmap visualization of agent-to-agent call patterns.","operationId":"get_agent_interaction_matrix","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Time period for analysis","required":false,"schema":{"type":"string","default":"THIRTY_DAYS","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"THIRTY_DAYS"},{"name":"traceType","in":"query","description":"Filter by specific trace type (null for all)","required":false,"schema":{"type":"string"},"example":"chat_completion"},{"name":"agents","in":"query","description":"Filter by specific agent names (null for all)","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":"DataProcessor,ValidationAgent"},{"name":"intensityMode","in":"query","description":"Intensity calculation mode for heatmap visualization. ABSOLUTE uses IQR-based global comparison, RELATIVE uses row-based percentage. Default: ABSOLUTE","required":false,"schema":{"type":"string","default":"ABSOLUTE","enum":["ABSOLUTE","RELATIVE"]},"example":"RELATIVE"},{"name":"environment","in":"query","description":"Optional environment filter (e.g., production, staging). Omit to include all environments.","required":false,"schema":{"type":"string"},"example":"production"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":15,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["callCount,DESC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Returns agent interaction matrix data with paginated agents and interactions.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentInteractionMatrixPagedModel"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AgentInteractionMatrixPagedModel"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/total-cost-by-provider-over-time":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Total Costs By Provider Over Time","description":"Get Total Costs By Provider Over Time","operationId":"get_total_cost_by_provider_over_time","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results (e.g., TWELVE_MONTHS). Ignored if both startDate and endDate are provided. Defaults to TWELVE_MONTHS when no custom date range is specified.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"TWELVE_MONTHS"},{"name":"startDate","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with endDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with startDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"},{"name":"providers","in":"query","description":"Optional list of AI providers to filter results. Omit to include all providers.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":"openai"}],"responses":{"200":{"description":"Returns provider total cost metrics over time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedProviderAIMetricTimestampGroupResource"},"examples":{"Provider Cost Over Time":{"description":"Provider Cost Over Time","value":[{"startTimestamp":1758576080223,"endTimestamp":1758662479223,"groups":[{"groupName":"Anthropic","metrics":[{"startTimestamp":1758576080223,"endTimestamp":1758662479223,"provider":"Anthropic","metricResult":0,"metricType":"COST_METRIC_BY_PROVIDER_OVER_TIME","aggregatedModelAIMetrics":[]}]},{"groupName":"OpenAI","metrics":[{"startTimestamp":1758576080223,"endTimestamp":1758662479223,"provider":"OpenAI","metricResult":0,"metricType":"COST_METRIC_BY_PROVIDER_OVER_TIME","aggregatedModelAIMetrics":[]}]}]}]}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/total-cost-by-model":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Total Cost By Model","description":"Get total cost by model","operationId":"get_total_cost_by_model","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results (e.g., TWELVE_MONTHS). Ignored if both startDate and endDate are provided. Defaults to TWELVE_MONTHS when no custom date range is specified.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"TWELVE_MONTHS"},{"name":"startDate","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with endDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with startDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"},{"name":"provider","in":"query","description":"Optional provider filter. Omit to include all providers.","required":false,"schema":{"type":"string"},"example":"openai"},{"name":"group","in":"query","description":"Aggregation group for the metric.","required":false,"schema":{"type":"string","enum":["TOTAL","MEAN","MEDIAN","MAXIMUM","MINIMUM"]},"example":"TOTAL"}],"responses":{"200":{"description":"Returns model cost metrics for the requested range.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedModelAIMetricTimestampGroupResource"},"examples":{"Total Cost by Model":{"description":"Total Cost by Model","value":{"startTimestamp":"2024-11-01T00:00:00Z","endTimestamp":"2025-10-22T21:31:43.364556304Z","groups":[{"groupName":"claude-3-opus-20240229","metrics":[{"startTimestamp":"2024-11-01T00:00:00Z","endTimestamp":"2025-10-22T21:31:43.364556304Z","model":"claude-3-opus-20240229","metricResult":0.087825,"metricType":"COST_METRIC_BY_MODEL"}]},{"groupName":"gpt-4","metrics":[{"startTimestamp":"2024-11-01T00:00:00Z","endTimestamp":"2025-10-22T21:31:43.364556304Z","model":"gpt-4","metricResult":0.0345,"metricType":"COST_METRIC_BY_MODEL"}]}]}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/tokens-per-minute-by-provider":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Tokens Per Minute by AI Provider","description":"Get Tokens Per Minute by AI Provider","operationId":"get_tokens_per_minute_by_provider","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results (e.g., TWELVE_MONTHS). Ignored if both startDate and endDate are provided. Defaults to TWELVE_MONTHS when no custom date range is specified.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"TWELVE_MONTHS"},{"name":"startDate","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with endDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with startDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"},{"name":"providers","in":"query","description":"Optional list of provider identifiers to include. Omit to include all providers.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":"openai"},{"name":"tokenType","in":"query","description":"Token type to aggregate. Defaults to TOTAL.","required":false,"schema":{"type":"string"},"example":"TOTAL"}],"responses":{"200":{"description":"Returns tokens-per-minute metrics by provider over time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedProviderAIMetricTimestampGroupResource"},"examples":{"Tokens Per Minute by Provider Over Time":{"description":"Tokens Per Minute by Provider Over Time","value":[{"startTimestamp":1730419200000,"endTimestamp":1733011199000,"groups":[{"groupName":"Anthropic","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1733011199000,"provider":"Anthropic","metricResult":0,"metricType":"TOKENS_PER_MINUTE_BY_PROVIDER"}]},{"groupName":"OpenAI","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1733011199000,"provider":"OpenAI","metricResult":0,"metricType":"TOKENS_PER_MINUTE_BY_PROVIDER"}]}]}]}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/task-types":{"get":{"tags":["AI Completion Metrics"],"summary":"Get all task types for a team","description":"Get all task types for a team","operationId":"get_unique_task_types_for_team","parameters":[{"name":"teamId","in":"query","required":true,"schema":{"type":"string"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"200":{"description":"The Task Types","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedAIMetric"},"examples":{"Task Types List":{"description":"Task Types List","value":{"_embedded":{"stringList":["code-generation"]},"page":{"size":20,"totalElements":1,"totalPages":1,"number":0}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/revenue-metric-by-product":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Revenue Metric By Product","description":"Get revenue metric by product","operationId":"get_revenue_metric_by_product","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results (e.g., TWELVE_MONTHS). Ignored if both startDate and endDate are provided. Defaults to TWELVE_MONTHS when no custom date range is specified.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"TWELVE_MONTHS"},{"name":"startDate","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with endDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with startDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"},{"name":"group","in":"query","description":"Aggregation group for the metric.","required":false,"schema":{"type":"string","enum":["TOTAL","MEAN","MEDIAN","MAXIMUM","MINIMUM"]},"example":"TOTAL"},{"name":"products","in":"query","description":"Optional list of product identifiers to include. Omit to include all products.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Returns product revenue metrics for the requested range.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedProductAIMetricTimestampGroupResource"},"examples":{"Revenue Metric by Product":{"description":"Revenue Metric by Product","value":{"startTimestamp":1730419200000,"endTimestamp":1761168726058,"groups":[{"groupName":"Default AI Product","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1761168726058,"productId":"3BygBBL","productName":"Default AI Product","metricResult":0,"metricType":"REVENUE_METRIC_BY_PRODUCT"}]},{"groupName":"prod-ai-assistant","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1761168726058,"productId":"3BygBOL","productName":"prod-ai-assistant","metricResult":0,"metricType":"REVENUE_METRIC_BY_PRODUCT"}]}]}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/revenue-metric-by-organization":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Revenue Metric By Organization","description":"Retrieve revenue metrics by organization for the requested range.","operationId":"get_revenue_metric_by_organization","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results (e.g., TWELVE_MONTHS). Ignored if both startDate and endDate are provided. Defaults to TWELVE_MONTHS when no custom date range is specified.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"TWELVE_MONTHS"},{"name":"startDate","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with endDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with startDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"},{"name":"group","in":"query","description":"Aggregation group for the metric.","required":false,"schema":{"type":"string","enum":["TOTAL","MEAN","MEDIAN","MAXIMUM","MINIMUM"]},"example":"TOTAL"},{"name":"products","in":"query","description":"Optional list of product identifiers to filter organization revenue metrics.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Returns organization revenue metrics for the requested range.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedOrganizationAIMetricTimestampGroupResource"},"examples":{"Revenue Metric by Organization":{"description":"Revenue Metric by Organization","value":{"startTimestamp":1730419200000,"endTimestamp":1761168747258,"groups":[{"groupName":"UNCLASSIFIED","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1761168747258,"organizationId":"QOjwW1Z","organizationName":"UNCLASSIFIED","metricResult":0,"metricType":"REVENUE_METRIC_BY_ORGANIZATION"}]},{"groupName":"org-acme-corp","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1761168747258,"organizationId":"JMwZBdZ","organizationName":"org-acme-corp","metricResult":0,"metricType":"REVENUE_METRIC_BY_ORGANIZATION"}]}]}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/providers":{"get":{"tags":["AI Completion Metrics"],"summary":"Get all providers for an team","description":"Get all providers for an team","operationId":"get_unique_providers_for_team","parameters":[{"name":"teamId","in":"query","required":true,"schema":{"type":"string"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"200":{"description":"The Providers","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedAIMetric"},"examples":{"Providers List":{"description":"Providers List","value":{"_embedded":{"stringList":["Anthropic","OpenAI"]},"page":{"size":20,"totalElements":2,"totalPages":1,"number":0}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/performance-metrics-by-agents":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Performance Metrics By Agent","description":"Get performance metrics by agent","operationId":"get_performance_metrics_by_agent","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results (e.g., TWELVE_MONTHS). Ignored if both startDate and endDate are provided. Defaults to TWELVE_MONTHS when no custom date range is specified.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"TWELVE_MONTHS"},{"name":"group","in":"query","description":"Aggregation group for the metric.","required":false,"schema":{"type":"string","enum":["TOTAL","MEAN","MEDIAN","MAXIMUM","MINIMUM"]},"example":"MEAN"},{"name":"startDate","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with endDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with startDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"},{"name":"agents","in":"query","description":"Optional list of agent identifiers to include. Omit to include all agents.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Returns agent performance metrics over time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedAgentAIMetricsTimestampGroupResource"},"examples":{"Performance Metrics by Agents":{"description":"Performance Metrics by Agents","value":{"startTimestamp":1730419200000,"endTimestamp":1761168772132,"groups":[{"groupName":"code-review-agent","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1761168772132,"agent":"code-review-agent","metricResult":5123,"metricType":"PERFORMANCE_METRIC_BY_AGENT"}]}]}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/performance-metric-by-provider":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Performance Metrics By Provider","description":"get performance metrics by provider","operationId":"get_performance_metrics_by_provider","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results (e.g., TWELVE_MONTHS). Ignored if both startDate and endDate are provided. Defaults to TWELVE_MONTHS when no custom date range is specified.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"TWELVE_MONTHS"},{"name":"group","in":"query","description":"Aggregation group for the metric.","required":false,"schema":{"type":"string","enum":["TOTAL","MEAN","MEDIAN","MAXIMUM","MINIMUM"]},"example":"MEAN"},{"name":"startDate","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with endDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with startDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"},{"name":"providers","in":"query","description":"Optional list of provider identifiers to include. Omit to include all providers.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Returns provider performance metrics over time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedProviderAIMetricTimestampGroupResource"},"examples":{"Performance Metrics by Provider":{"description":"Performance Metrics by Provider","value":{"startTimestamp":1730419200000,"endTimestamp":1761168783796,"groups":[{"groupName":"Anthropic","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1761168783796,"provider":"Anthropic","metricResult":5123,"metricType":"PERFORMANCE_METRIC_BY_PROVIDER"}]},{"groupName":"OpenAI","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1761168783796,"provider":"OpenAI","metricResult":2125,"metricType":"PERFORMANCE_METRIC_BY_PROVIDER"}]}]}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/performance-metric-by-model":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Performance Metrics By Model","description":"Retrieve performance metrics by model over time.","operationId":"get_performance_metric_by_model","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results (e.g., TWELVE_MONTHS). Ignored if both startDate and endDate are provided. Defaults to TWELVE_MONTHS when no custom date range is specified.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"TWELVE_MONTHS"},{"name":"group","in":"query","description":"Aggregation group for the metric.","required":false,"schema":{"type":"string","enum":["TOTAL","MEAN","MEDIAN","MAXIMUM","MINIMUM"]},"example":"MEAN"},{"name":"startDate","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with endDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with startDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"},{"name":"models","in":"query","description":"Optional list of AI models to filter. Valid models can be obtained using the /sources/ai/models endpoint. Omit to include all models.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":"gpt-4"}],"responses":{"200":{"description":"Returns model performance metrics over time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedModelAIMetricTimestampGroupResource"},"examples":{"Performance Metrics by Model":{"description":"Performance Metrics by Model","value":{"startTimestamp":1730419200000,"endTimestamp":1761168800000,"groups":[{"groupName":"claude-3-opus-20240229","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1761168800000,"model":"claude-3-opus-20240229","metricResult":5123,"metricType":"PERFORMANCE_METRIC_BY_MODEL"}]},{"groupName":"gpt-4","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1761168800000,"model":"gpt-4","metricResult":1833.3333333333333,"metricType":"PERFORMANCE_METRIC_BY_MODEL"}]}]}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/percentage-revenue-metric-by-product":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Percentage Revenue Metric By Product","description":"Retrieve percentage revenue metrics by product for the requested range.","operationId":"get_percentage_revenue_metric_by_product","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results (e.g., TWELVE_MONTHS). Ignored if both startDate and endDate are provided. Defaults to TWELVE_MONTHS when no custom date range is specified.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"TWELVE_MONTHS"},{"name":"startDate","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with endDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with startDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"},{"name":"products","in":"query","description":"Optional list of product identifiers to include. Omit to include all products.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Returns product percentage revenue metrics for the requested range.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedProductAIMetricTimestampGroupResource"},"examples":{"Percentage Revenue Metric by Product":{"description":"Percentage Revenue Metric by Product","value":{"startTimestamp":1730419200000,"endTimestamp":1761168756197,"groups":[{"groupName":"Default AI Product","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1761168756197,"productId":"3BygBBL","productName":"Default AI Product","metricResult":0,"metricType":"REVENUE_PERCENTAGE_BY_PRODUCT"}]},{"groupName":"prod-ai-assistant","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1761168756197,"productId":"3BygBOL","productName":"prod-ai-assistant","metricResult":0,"metricType":"REVENUE_PERCENTAGE_BY_PRODUCT"}]}]}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/percentage-revenue-metric-by-organization":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Percentage Revenue Metric By Organization","description":"Retrieve percentage revenue metrics by organization for the requested range.","operationId":"get_percentage_revenue_metric_by_organization","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results (e.g., TWELVE_MONTHS). Ignored if both startDate and endDate are provided. Defaults to TWELVE_MONTHS when no custom date range is specified.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"TWELVE_MONTHS"},{"name":"startDate","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with endDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with startDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"},{"name":"organizations","in":"query","description":"Optional list of organization identifiers to include. Omit to include all organizations.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Returns organization percentage revenue metrics for the requested range.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedOrganizationAIMetricTimestampGroupResource"},"examples":{"Percentage Revenue Metric by Organization":{"description":"Percentage Revenue Metric by Organization","value":{"startTimestamp":1730419200000,"endTimestamp":1761168732815,"groups":[{"groupName":"UNCLASSIFIED","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1761168732815,"organizationId":"QOjwW1Z","organizationName":"UNCLASSIFIED","metricResult":0,"metricType":"REVENUE_PERCENTAGE_BY_ORGANIZATION"}]},{"groupName":"org-acme-corp","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1761168732815,"organizationId":"JMwZBdZ","organizationName":"org-acme-corp","metricResult":0,"metricType":"REVENUE_PERCENTAGE_BY_ORGANIZATION"}]}]}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/models":{"get":{"tags":["AI Completion Metrics"],"summary":"Get all model for an team","description":"Get all model for an team","operationId":"get_unique_models_for_team","parameters":[{"name":"teamId","in":"query","required":true,"schema":{"type":"string"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"200":{"description":"The Models","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedAIMetric"},"examples":{"Models List":{"description":"Models List","value":{"_embedded":{"stringList":["claude-3-opus-20240229","gpt-4","gpt-4-turbo"]},"page":{"size":20,"totalElements":3,"totalPages":1,"number":0}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/model-sources":{"get":{"tags":["AI Completion Metrics"],"summary":"Get all model sources for a team","description":"Get all model sources for a team","operationId":"get_unique_model_sources_for_team","parameters":[{"name":"teamId","in":"query","required":true,"schema":{"type":"string"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"200":{"description":"The Model Sources","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedAIMetric"},"examples":{"Model Sources List":{"description":"Model Sources List","value":{"_embedded":{"stringList":["DIRECT","OPENAI"]},"page":{"size":20,"totalElements":2,"totalPages":1,"number":0}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/images":{"get":{"tags":["AI Image Metrics"],"summary":"List AI Image Metrics by team","description":"\n            Retrieve a paginated list of AI image metrics for a specified team.\n            Includes image-specific fields like resolution, quality, style, format, and image counts.\n        ","operationId":"list_ai_image_metrics","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"startDate","in":"query","description":"Filter start date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter start date/time in ISO 8601 format.","example":"2025-09-01T00:00:00Z"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"Filter end date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter end date/time in ISO 8601 format.","example":"2025-09-30T23:59:59Z"},"example":"2025-09-30T23:59:59Z"},{"name":"requestDurationMin","in":"query","description":"Minimum request duration (in milliseconds).","required":false,"schema":{"type":"integer","format":"int64","description":"Minimum request duration (in milliseconds).","example":500,"maximum":300000,"minimum":0},"example":500},{"name":"requestDurationMax","in":"query","description":"Maximum request duration (in milliseconds).","required":false,"schema":{"type":"integer","format":"int64","description":"Maximum request duration (in milliseconds).","example":10000,"maximum":300000,"minimum":0},"example":10000},{"name":"totalCostMin","in":"query","description":"Minimum total cost ($).","required":false,"schema":{"type":"number","description":"Minimum total cost ($).","example":0.1,"maximum":999999.99,"minimum":0},"example":0.1},{"name":"totalCostMax","in":"query","description":"Maximum total cost ($).","required":false,"schema":{"type":"number","description":"Maximum total cost ($).","example":5,"maximum":999999.99,"minimum":0},"example":5},{"name":"transactionId","in":"query","description":"Exact transaction ID match.","required":false,"schema":{"type":"string","description":"Exact transaction ID match.","example":"123e4567-e89b-12d3-a456-426614174000","maxLength":255,"minLength":1},"example":"123e4567-e89b-12d3-a456-426614174000"},{"name":"traceId","in":"query","description":"Exact trace ID match.","required":false,"schema":{"type":"string","description":"Exact trace ID match.","example":"fedcba98-7654-3210-fedc-ba9876543210","maxLength":255,"minLength":1},"example":"fedcba98-7654-3210-fedc-ba9876543210"},{"name":"traceType","in":"query","description":"Filter by trace type. Use 'unknown' for metrics without traceType.","required":false,"schema":{"type":"string","description":"Filter by trace type. Use 'unknown' for metrics without traceType.","example":"image_generation","maxLength":255,"minLength":1},"example":"image_generation"},{"name":"organizationName","in":"query","description":"Filter by consuming organization name.","required":false,"schema":{"type":"string","description":"Filter by consuming organization name.","example":"Test Customer","maxLength":255,"minLength":1},"example":"Test Customer"},{"name":"subscriberId","in":"query","description":"Filter by subscriber ID.","required":false,"schema":{"type":"string","description":"Filter by subscriber ID.","example":"sub_123abc","maxLength":255,"minLength":1},"example":"sub_123abc"},{"name":"subscriberEmail","in":"query","description":"Filter by subscriber email.","required":false,"schema":{"type":"string","description":"Filter by subscriber email.","example":"user@example.com","maxLength":255,"minLength":1},"example":"user@example.com"},{"name":"subscriptionId","in":"query","description":"Filter by subscription ID.","required":false,"schema":{"type":"string","description":"Filter by subscription ID.","example":"subscription_456def","maxLength":255,"minLength":1},"example":"subscription_456def"},{"name":"productId","in":"query","description":"Filter by product ID.","required":false,"schema":{"type":"string","description":"Filter by product ID.","example":"kB17z94","maxLength":255,"minLength":1},"example":"kB17z94"},{"name":"agent","in":"query","description":"Filter by agent name.","required":false,"schema":{"type":"string","description":"Filter by agent name.","example":"image-gen-agent","maxLength":255,"minLength":1},"example":"image-gen-agent"},{"name":"provider","in":"query","description":"Filter by AI provider.","required":false,"schema":{"type":"string","description":"Filter by AI provider.","example":"OPENAI","maxLength":255,"minLength":1},"example":"OPENAI"},{"name":"model","in":"query","description":"Filter by AI model.","required":false,"schema":{"type":"string","description":"Filter by AI model.","example":"dall-e-3","maxLength":255,"minLength":1},"example":"dall-e-3"},{"name":"modelSource","in":"query","description":"Filter by model source.","required":false,"schema":{"type":"string","description":"Filter by model source.","example":"OPENAI","maxLength":255,"minLength":1},"example":"OPENAI"},{"name":"errorReason","in":"query","description":"Filter by error reason.","required":false,"schema":{"type":"string","description":"Filter by error reason.","example":"CONTENT_POLICY_VIOLATION","maxLength":255,"minLength":1},"example":"CONTENT_POLICY_VIOLATION"},{"name":"operationSubtype","in":"query","description":"Filter by operation subtype.","required":false,"schema":{"type":"string","description":"Filter by operation subtype.","enum":["generation","edit","variation"],"example":"generation","maxLength":50,"minLength":1},"example":"generation"},{"name":"environment","in":"query","description":"Filter by deployment environment.","required":false,"schema":{"type":"string","description":"Filter by deployment environment.","enum":["production","staging","development","test"],"example":"production","maxLength":50,"minLength":1},"example":"production"},{"name":"billingSkipped","in":"query","description":"Filter by whether billing was skipped.","required":false,"schema":{"type":"boolean","description":"Filter by whether billing was skipped.","example":false},"example":false},{"name":"requestedImageCountMin","in":"query","description":"Minimum requested image count.","required":false,"schema":{"type":"integer","format":"int32","description":"Minimum requested image count.","example":1,"maximum":100,"minimum":0},"example":1},{"name":"requestedImageCountMax","in":"query","description":"Maximum requested image count.","required":false,"schema":{"type":"integer","format":"int32","description":"Maximum requested image count.","example":10,"maximum":100,"minimum":0},"example":10},{"name":"actualImageCountMin","in":"query","description":"Minimum actual image count generated.","required":false,"schema":{"type":"integer","format":"int32","description":"Minimum actual image count generated.","example":1,"maximum":100,"minimum":0},"example":1},{"name":"actualImageCountMax","in":"query","description":"Maximum actual image count generated.","required":false,"schema":{"type":"integer","format":"int32","description":"Maximum actual image count generated.","example":10,"maximum":100,"minimum":0},"example":10},{"name":"resolution","in":"query","description":"Filter by image resolution.","required":false,"schema":{"type":"string","description":"Filter by image resolution.","enum":["256x256","512x512","1024x1024","1024x1792","1792x1024"],"example":"1024x1024","maxLength":20,"minLength":1},"example":"1024x1024"},{"name":"quality","in":"query","description":"Filter by image quality setting.","required":false,"schema":{"type":"string","description":"Filter by image quality setting.","enum":["standard","hd"],"example":"hd","maxLength":20,"minLength":1},"example":"hd"},{"name":"style","in":"query","description":"Filter by image style.","required":false,"schema":{"type":"string","description":"Filter by image style.","enum":["vivid","natural"],"example":"vivid","maxLength":20,"minLength":1},"example":"vivid"},{"name":"format","in":"query","description":"Filter by image format/response format.","required":false,"schema":{"type":"string","description":"Filter by image format/response format.","enum":["url","b64_json"],"example":"url","maxLength":20,"minLength":1},"example":"url"},{"name":"sourceImageProvided","in":"query","description":"Filter by whether source image was provided (for edits/variations).","required":false,"schema":{"type":"boolean","description":"Filter by whether source image was provided (for edits/variations).","example":true},"example":true},{"name":"revisedPromptProvided","in":"query","description":"Filter by whether revised prompt was returned.","required":false,"schema":{"type":"boolean","description":"Filter by whether revised prompt was returned.","example":true},"example":true},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["requestTime,DESC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Returns a paginated list of AI Image Metric objects.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIImageMetricPagedModel_Read"},"examples":{"AI Image Metrics List":{"description":"AI Image Metrics List","value":{"_embedded":{"aIImageMetricResourceList":[{"id":"i3Ka8j","resourceType":"ai.image.metric","label":"txn-img-001","created":"2025-10-17T17:53:39.119Z","transactionId":"txn-img-001","model":"dall-e-3","provider":"OpenAI","totalCost":0.04,"requestTime":"2025-10-17T17:35:00Z","responseTime":"2025-10-17T17:35:05Z","requestDuration":5000,"operationSubtype":"generation","requestedImageCount":2,"actualImageCount":2,"resolution":"1024x1024","quality":"hd","style":"vivid"}]},"page":{"size":20,"totalElements":1,"totalPages":1,"number":0}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AIImageMetricPagedModel_Read"},"examples":{"AI Image Metrics List":{"description":"AI Image Metrics List","value":{"_embedded":{"aIImageMetricResourceList":[{"id":"i3Ka8j","resourceType":"ai.image.metric","label":"txn-img-001","created":"2025-10-17T17:53:39.119Z","transactionId":"txn-img-001","model":"dall-e-3","provider":"OpenAI","totalCost":0.04,"requestTime":"2025-10-17T17:35:00Z","responseTime":"2025-10-17T17:35:05Z","requestDuration":5000,"operationSubtype":"generation","requestedImageCount":2,"actualImageCount":2,"resolution":"1024x1024","quality":"hd","style":"vivid"}]},"page":{"size":20,"totalElements":1,"totalPages":1,"number":0}}}}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - user is not authorized to view the team","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/images/{id}":{"get":{"tags":["AI Image Metrics"],"summary":"Get an AI Image Metric by ID","description":"Returns a single AI image metric with all image-specific fields.","operationId":"get_ai_image_metric","parameters":[{"name":"id","in":"path","description":"Unique identifier of the AI image metric. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Returns an AI Image Metric object.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIImageMetricResource_Read"},"examples":{"AI Image Metric":{"description":"AI Image Metric","value":{"id":"i3Ka8j","resourceType":"ai.image.metric","label":"txn-img-001","created":"2025-10-17T17:53:39.119Z","transactionId":"txn-img-001","model":"dall-e-3","provider":"OpenAI","totalCost":0.04,"requestTime":"2025-10-17T17:35:00Z","responseTime":"2025-10-17T17:35:05Z","requestDuration":5000,"operationSubtype":"generation","requestedImageCount":2,"actualImageCount":2,"resolution":"1024x1024","quality":"hd","style":"vivid","format":"url","revisedPromptProvided":true}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AIImageMetricResource_Read"},"examples":{"AI Image Metric":{"description":"AI Image Metric","value":{"id":"i3Ka8j","resourceType":"ai.image.metric","label":"txn-img-001","created":"2025-10-17T17:53:39.119Z","transactionId":"txn-img-001","model":"dall-e-3","provider":"OpenAI","totalCost":0.04,"requestTime":"2025-10-17T17:35:00Z","responseTime":"2025-10-17T17:35:05Z","requestDuration":5000,"operationSubtype":"generation","requestedImageCount":2,"actualImageCount":2,"resolution":"1024x1024","quality":"hd","style":"vivid","format":"url","revisedPromptProvided":true}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"AI image metric not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/sources/metrics/ai/data-connected":{"get":{"tags":["AI Completion Metrics"],"summary":"Returns if the data is connected or not","description":"Returns if the data is connected or not","operationId":"is_connected","parameters":[{"name":"teamId","in":"query","description":"Team ID to check connectivity for. If not provided, falls back to tenant-level check for backward compatibility.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Whether the ai data has been ingested","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"type":"boolean"},"examples":{"Data Connected Status":{"description":"Data Connected Status","value":{"isConnected":true}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/data-connected/sources":{"get":{"tags":["AI Completion Metrics"],"summary":"Returns per-source data-connection status for the current tenant","description":"Breaks the aggregate `isConnected` check out by ingestion pathway — provider billing sync, direct SDK/API metering, coding-assistant telemetry, and distributed traces — each with whether it has ever received data and when it last did, so callers can route and message by source type instead of relying on a single aggregate flag. Note on `traces`: this requires a multi-hop/agentic chain (a parent-child link, or multiple events sharing a traceId) — it is not simply \"has any call been traced,\" since every ingested event carries a traceId by default (defaulting to its own transaction id when none is set). `providerBilling.lastReceived` is day-level precision only (normalized to midnight UTC), since provider-billing syncs are not timestamped to the moment.","operationId":"getTenantDataSourceStatus","responses":{"200":{"description":"Per-source data-connection status for the tenant","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantDataSourceStatusResource_Read"},"examples":{"Data Source Status":{"description":"Data Source Status","value":{"providerBilling":{"connected":true,"lastReceived":"2026-07-06T00:00:00Z"},"sdkMetering":{"connected":false},"codingAssistant":{"connected":true,"lastReceived":"2026-07-07T08:00:00Z"},"traces":{"connected":false}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}}}}},"/v2/api/sources/metrics/ai/cost-metrics-by-team-over-time":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Cost Metrics By Team Over Time","description":"Get cost metrics by team over time","operationId":"get_cost_metrics_by_team_over_time","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results (e.g., TWELVE_MONTHS). Ignored if both startDate and endDate are provided. Defaults to TWELVE_MONTHS when no custom date range is specified.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"TWELVE_MONTHS"},{"name":"group","in":"query","description":"Aggregation group for the metric.","required":false,"schema":{"type":"string","enum":["TOTAL","MEAN","MEDIAN","MAXIMUM","MINIMUM"]},"example":"TOTAL"},{"name":"startDate","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with endDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with startDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"}],"responses":{"200":{"description":"Returns team cost metrics over time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedTeamAIMetricsTimestampGroupResource"},"examples":{"Cost Metrics by Team Over Time":{"description":"Cost Metrics by Team Over Time","value":[{"startTimestamp":1730419200000,"endTimestamp":1733011199000,"groups":[{"groupName":"XPozX1E","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1733011199000,"teamId":"XPozX1E","teamName":"Example Team Name","metricResult":0,"metricType":"COST_METRIC_BY_TEAM_OVER_TIME"}]}]}]}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/cost-metrics-by-subscriber-credential":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Cost By Credential","description":"Retrieve cost metrics by subscriber credential over time.","operationId":"get_cost_by_credential","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results (e.g., TWELVE_MONTHS). Ignored if both startDate and endDate are provided. Defaults to TWELVE_MONTHS when no custom date range is specified.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"TWELVE_MONTHS"},{"name":"group","in":"query","description":"Aggregation group for the metric.","required":true,"schema":{"type":"string","enum":["TOTAL","MEAN","MEDIAN","MAXIMUM","MINIMUM"]},"example":"TOTAL"},{"name":"startDate","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with endDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with startDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"},{"name":"credentials","in":"query","description":"Optional list of subscriber credential identifiers to include. Omit to include all credentials.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Returns credential cost metrics over time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedCredentialAIMetricTimestampGroupResource"},"examples":{"Cost Metrics by Credential Over Time":{"description":"Cost Metrics by Credential Over Time","value":[{"startTimestamp":1730419200000,"endTimestamp":1733011199000,"groups":[{"groupName":"ANONYMOUS","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1733011199000,"credentialName":"ANONYMOUS","credentialId":"Undefined","metricResult":0,"metricType":"COST_BY_CREDENTIAL_OVER_TIME"}]}]}]}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/cost-metrics-by-agents-over-time":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Cost Metrics By Agents Over Time","description":"Get cost metrics by agent over time","operationId":"get_cost_metrics_by_agent_over_time","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results (e.g., TWELVE_MONTHS). Ignored if both startDate and endDate are provided. Defaults to TWELVE_MONTHS when no custom date range is specified.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"TWELVE_MONTHS"},{"name":"group","in":"query","description":"Aggregation group for the metric.","required":false,"schema":{"type":"string","enum":["TOTAL","MEAN","MEDIAN","MAXIMUM","MINIMUM"]},"example":"TOTAL"},{"name":"startDate","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with endDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with startDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"},{"name":"agents","in":"query","description":"Optional list of agent identifiers to include. Omit to include all agents.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Returns agent cost metrics over time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedAgentAIMetricsTimestampGroupResource"},"examples":{"Cost Metrics by Agents Over Time":{"description":"Cost Metrics by Agents Over Time","value":[{"startTimestamp":1730419200000,"endTimestamp":1733011199000,"groups":[{"groupName":"code-review-agent","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1733011199000,"agent":"code-review-agent","metricResult":0,"metricType":"COST_METRIC_BY_AGENT_OVER_TIME"}]}]}]}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/cost-metric-by-provider":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Total Cost By Provider","description":"Get Total Cost By Provider","operationId":"get_total_cost_by_provider","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results (e.g., TWELVE_MONTHS). Ignored if both startDate and endDate are provided. Defaults to TWELVE_MONTHS when no custom date range is specified.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"TWELVE_MONTHS"},{"name":"group","in":"query","description":"Aggregation group for the metric.","required":false,"schema":{"type":"string","enum":["TOTAL","MEAN","MEDIAN","MAXIMUM","MINIMUM"]},"example":"TOTAL"},{"name":"startDate","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with endDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with startDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"},{"name":"providers","in":"query","description":"Optional list of provider identifiers to include. Omit to include all providers.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":"openai"}],"responses":{"200":{"description":"Returns provider cost metrics for the requested range.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedProviderAIMetricTimestampGroupResource"},"examples":{"Provider Cost Metrics":{"description":"Provider Cost Metrics","value":{"startTimestamp":1758576097892,"endTimestamp":1761168097892,"groups":[{"groupName":"Anthropic","metrics":[{"startTimestamp":1758576097892,"endTimestamp":1761168097892,"provider":"Anthropic","metricResult":0.087825,"metricType":"COST_BY_PROVIDER","aggregatedModelAIMetrics":[]}]},{"groupName":"OpenAI","metrics":[{"startTimestamp":1758576097892,"endTimestamp":1761168097892,"provider":"OpenAI","metricResult":0.2645,"metricType":"COST_BY_PROVIDER","aggregatedModelAIMetrics":[]}]}]}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/cost-metric-by-provider-over-time":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Cost Metric By Provider Over Time","description":"get cost metric by provider over time","operationId":"get_cost_metric_by_provider_over_time","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"startDate","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with endDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with startDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"},{"name":"group","in":"query","description":"Aggregation group for the metric.","required":true,"schema":{"type":"string","enum":["TOTAL","MEAN","MEDIAN","MAXIMUM","MINIMUM"]},"example":"TOTAL"},{"name":"period","in":"query","description":"Predefined time window to aggregate results (e.g., TWELVE_MONTHS). Ignored if both startDate and endDate are provided. Defaults to TWELVE_MONTHS when no custom date range is specified.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"TWELVE_MONTHS"},{"name":"providers","in":"query","description":"Optional list of provider identifiers to include. Omit to include all providers.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":"openai"}],"responses":{"200":{"description":"Returns provider cost metrics over time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedProviderAIMetricTimestampGroupResource"}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/cost-metric-by-product":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Cost Metric By Product","description":"Get cost metric by product","operationId":"get_cost_metric_by_product","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results (e.g., TWELVE_MONTHS). Ignored if both startDate and endDate are provided. Defaults to TWELVE_MONTHS when no custom date range is specified.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"TWELVE_MONTHS"},{"name":"startDate","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with endDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with startDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"},{"name":"group","in":"query","description":"Aggregation group for the metric.","required":false,"schema":{"type":"string","enum":["TOTAL","MEAN","MEDIAN","MAXIMUM","MINIMUM"]},"example":"TOTAL"},{"name":"products","in":"query","description":"Optional list of product identifiers to include. Omit to include all products.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Returns product cost metrics for the requested range.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedProductAIMetricTimestampGroupResource"},"examples":{"Cost Metric by Product":{"description":"Cost Metric by Product","value":{"startTimestamp":1730419200000,"endTimestamp":1761168742277,"groups":[{"groupName":"Default AI Product","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1761168742277,"productId":"3BygBBL","productName":"Default AI Product","metricResult":0.0345,"metricType":"COST_METRIC_BY_PRODUCT"}]},{"groupName":"prod-ai-assistant","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1761168742277,"productId":"3BygBOL","productName":"prod-ai-assistant","metricResult":0.087825,"metricType":"COST_METRIC_BY_PRODUCT"}]}]}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/cost-metric-by-organization":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Cost Metric By Organization","description":"Get cost metric by organization","operationId":"get_cost_metric_by_organization","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results (e.g., TWELVE_MONTHS). Ignored if both startDate and endDate are provided. Defaults to TWELVE_MONTHS when no custom date range is specified.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"TWELVE_MONTHS"},{"name":"startDate","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with endDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with startDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"},{"name":"group","in":"query","description":"Aggregation group for the metric.","required":false,"schema":{"type":"string","enum":["TOTAL","MEAN","MEDIAN","MAXIMUM","MINIMUM"]},"example":"TOTAL"},{"name":"organizations","in":"query","description":"Optional list of organization identifiers to include. Omit to include all organizations.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Returns organization cost metrics for the requested range.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedOrganizationAIMetricTimestampGroupResource"},"examples":{"Cost Metric by Organization":{"description":"Cost Metric by Organization","value":{"startTimestamp":1730419200000,"endTimestamp":1761168715750,"groups":[{"groupName":"UNCLASSIFIED","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1761168715750,"organizationId":"QOjwW1Z","organizationName":"UNCLASSIFIED","metricResult":0.2645,"metricType":"COST_METRIC_BY_ORGANIZATION"}]},{"groupName":"org-acme-corp","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1761168715750,"organizationId":"JMwZBdZ","organizationName":"org-acme-corp","metricResult":0.087825,"metricType":"COST_METRIC_BY_ORGANIZATION"}]}]}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/cost-metric-by-model":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Cost Metric By Model","description":"Get cost metric by model","operationId":"get_cost_metric_by_model","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results (e.g., TWELVE_MONTHS). Unrecognized values are rejected with 400. Ignored if both startDate and endDate are provided. Defaults to TWELVE_MONTHS when no custom date range is specified.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"TWELVE_MONTHS"},{"name":"startDate","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with endDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with startDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"},{"name":"models","in":"query","description":"Optional list of AI models to filter. Valid models can be obtained using the /sources/ai/models endpoint. Omit to include all models.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":"gpt-4"},{"name":"group","in":"query","description":"Aggregation group for the metric.","required":false,"schema":{"type":"string","enum":["TOTAL","MEAN","MEDIAN","MAXIMUM","MINIMUM"]},"example":"TOTAL"}],"responses":{"200":{"description":"Returns model cost metrics for the requested range.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedModelAIMetricTimestampGroupResource"},"examples":{"Cost Metric by Model":{"description":"Cost Metric by Model","value":{"startTimestamp":"2024-11-01T00:00:00Z","endTimestamp":"2025-10-22T21:31:50.258761207Z","groups":[{"groupName":"claude-3-opus-20240229","metrics":[{"startTimestamp":"2024-11-01T00:00:00Z","endTimestamp":"2025-10-22T21:31:50.258761207Z","model":"claude-3-opus-20240229","metricResult":0.087825,"metricType":"COST_METRIC_BY_MODEL"}]},{"groupName":"gpt-4","metrics":[{"startTimestamp":"2024-11-01T00:00:00Z","endTimestamp":"2025-10-22T21:31:50.258761207Z","model":"gpt-4","metricResult":0.0345,"metricType":"COST_METRIC_BY_MODEL"}]}]}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/cost-metric-by-agents":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Cost Metric By Agents","description":"Get cost metric by agents","operationId":"get_cost_metric_by_agents","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results (e.g., TWELVE_MONTHS). Ignored if both startDate and endDate are provided. Defaults to TWELVE_MONTHS when no custom date range is specified.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"TWELVE_MONTHS"},{"name":"startDate","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with endDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with startDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"},{"name":"group","in":"query","description":"Aggregation group for the metric.","required":false,"schema":{"type":"string","enum":["TOTAL","MEAN","MEDIAN","MAXIMUM","MINIMUM"]},"example":"TOTAL"},{"name":"agents","in":"query","description":"Optional list of agent identifiers to include. Omit to include all agents.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Returns agent cost metrics for the requested range.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedAgentAIMetricsTimestampGroupResource"},"examples":{"Cost Metric by Agents":{"description":"Cost Metric by Agents","value":{"startTimestamp":1730419200000,"endTimestamp":1761168720725,"groups":[{"groupName":"code-review-agent","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1761168720725,"agent":"code-review-agent","metricResult":0.087825,"metricType":"COST_METRIC_BY_AGENT"}]}]}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/cost-by-model-over-time":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Cost by Model Over Time","description":"Retrieve cost metrics by model over time.","operationId":"get_cost_by_model_over_time","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"startDate","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with endDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with startDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"},{"name":"group","in":"query","description":"Aggregation group for the metric. Defaults to TOTAL.","required":false,"schema":{"type":"string","enum":["TOTAL","MEAN","MEDIAN","MAXIMUM","MINIMUM"]},"example":"TOTAL"},{"name":"period","in":"query","description":"Predefined time window to aggregate results (e.g., TWELVE_MONTHS). Ignored if both startDate and endDate are provided. Defaults to TWELVE_MONTHS when no custom date range is specified.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"TWELVE_MONTHS"},{"name":"models","in":"query","description":"Optional list of AI models to filter. Valid models can be obtained using the /sources/ai/models endpoint. Omit to include all models.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":"gpt-4"}],"responses":{"200":{"description":"Returns model cost metrics over time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedModelAIMetricTimestampGroupResource"},"examples":{"Model Cost Over Time":{"description":"Model Cost Over Time","value":[{"startTimestamp":"2025-10-21T21:26:10.384126492Z","endTimestamp":"2025-10-22T21:26:10.384126492Z","groups":[{"groupName":"gpt-4-turbo","metrics":[{"startTimestamp":"2025-10-21T21:26:10.384126492Z","endTimestamp":"2025-10-22T21:26:10.384126492Z","model":"gpt-4-turbo","metricResult":0,"metricType":"COST_METRIC_BY_MODEL_OVER_TIME"}]}]}]}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/completions":{"get":{"tags":["AI Completion Metrics"],"summary":"List AI Completion Metrics by team","description":"Retrieve a paginated list of AI completion metrics for a specified team.","operationId":"list_ai_completion_metrics","parameters":[{"name":"query","in":"query","description":"Searches trace ID and transaction ID by exact match first; when no ID matches, falls back to partial match across agent, model, provider, error reason and subscriber email.","required":false,"schema":{"type":"string"},"example":"gpt-4o"},{"name":"startDate","in":"query","description":"Filter start date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter start date/time in ISO 8601 format.","example":"2025-09-01T00:00:00Z"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"Filter end date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter end date/time in ISO 8601 format.","example":"2025-09-01T00:00:00Z"},"example":"2025-09-01T00:00:00Z"},{"name":"timeToFirstTokenMin","in":"query","description":"Minimum time to first token (in milliseconds).","required":false,"schema":{"type":"integer","format":"int64","description":"Minimum time to first token (in milliseconds).","example":100,"maximum":60000,"minimum":0},"example":100},{"name":"timeToFirstTokenMax","in":"query","description":"Maximum time to first token (in milliseconds).","required":false,"schema":{"type":"integer","format":"int64","description":"Maximum time to first token (in milliseconds).","example":5000,"maximum":60000,"minimum":0},"example":5000},{"name":"requestDurationMin","in":"query","description":"Minimum request duration (in milliseconds).","required":false,"schema":{"type":"integer","format":"int64","description":"Minimum request duration (in milliseconds).","example":500,"maximum":300000,"minimum":0},"example":500},{"name":"requestDurationMax","in":"query","description":"Maximum request duration (in milliseconds).","required":false,"schema":{"type":"integer","format":"int64","description":"Maximum request duration (in milliseconds).","example":10000,"maximum":300000,"minimum":0},"example":10000},{"name":"mediationLatencyMin","in":"query","description":"Minimum mediation latency (in milliseconds).","required":false,"schema":{"type":"integer","format":"int64","description":"Minimum mediation latency (in milliseconds).","example":10,"maximum":10000,"minimum":0},"example":10},{"name":"mediationLatencyMax","in":"query","description":"Maximum mediation latency (in milliseconds).","required":false,"schema":{"type":"integer","format":"int64","description":"Maximum mediation latency (in milliseconds).","example":50,"maximum":10000,"minimum":0},"example":50},{"name":"inputTokenCountMin","in":"query","description":"Minimum input tokens.","required":false,"schema":{"type":"integer","format":"int64","description":"Minimum input tokens.","example":10,"maximum":10000000,"minimum":0},"example":10},{"name":"inputTokenCountMax","in":"query","description":"Maximum input tokens.","required":false,"schema":{"type":"integer","format":"int64","description":"Maximum input tokens.","example":1000,"maximum":10000000,"minimum":0},"example":1000},{"name":"outputTokenCountMin","in":"query","description":"Minimum output tokens.","required":false,"schema":{"type":"integer","format":"int64","description":"Minimum output tokens.","example":50,"maximum":10000000,"minimum":0},"example":50},{"name":"outputTokenCountMax","in":"query","description":"Maximum output tokens.","required":false,"schema":{"type":"integer","format":"int64","description":"Maximum output tokens.","example":2000,"maximum":10000000,"minimum":0},"example":2000},{"name":"reasoningTokenCountMin","in":"query","description":"Minimum reasoning tokens.","required":false,"schema":{"type":"integer","format":"int64","description":"Minimum reasoning tokens.","example":0,"maximum":5000000,"minimum":0},"example":0},{"name":"reasoningTokenCountMax","in":"query","description":"Maximum reasoning tokens.","required":false,"schema":{"type":"integer","format":"int64","description":"Maximum reasoning tokens.","example":1000,"maximum":5000000,"minimum":0},"example":1000},{"name":"cachedTokenCountMin","in":"query","description":"Minimum cached tokens.","required":false,"schema":{"type":"integer","format":"int64","description":"Minimum cached tokens.","example":0,"maximum":5000000,"minimum":0},"example":0},{"name":"cachedTokenCountMax","in":"query","description":"Maximum cached tokens.","required":false,"schema":{"type":"integer","format":"int64","description":"Maximum cached tokens.","example":1000,"maximum":5000000,"minimum":0},"example":1000},{"name":"totalTokenCountMin","in":"query","description":"Minimum total tokens.","required":false,"schema":{"type":"integer","format":"int64","description":"Minimum total tokens.","example":100,"maximum":20000000,"minimum":0},"example":100},{"name":"totalTokenCountMax","in":"query","description":"Maximum total tokens.","required":false,"schema":{"type":"integer","format":"int64","description":"Maximum total tokens.","example":5000,"maximum":20000000,"minimum":0},"example":5000},{"name":"inputTokenCostMin","in":"query","description":"Minimum input cost ($).","required":false,"schema":{"type":"number","description":"Minimum input cost ($).","example":0.01,"maximum":99999.99,"minimum":0},"example":0.01},{"name":"inputTokenCostMax","in":"query","description":"Maximum input cost ($).","required":false,"schema":{"type":"number","description":"Maximum input cost ($).","example":1,"maximum":99999.99,"minimum":0},"example":1},{"name":"outputTokenCostMin","in":"query","description":"Minimum output cost ($).","required":false,"schema":{"type":"number","description":"Minimum output cost ($).","example":0.05,"maximum":99999.99,"minimum":0},"example":0.05},{"name":"outputTokenCostMax","in":"query","description":"Maximum output cost ($).","required":false,"schema":{"type":"number","description":"Maximum output cost ($).","example":2.5,"maximum":99999.99,"minimum":0},"example":2.5},{"name":"totalCostMin","in":"query","description":"Minimum total cost ($).","required":false,"schema":{"type":"number","description":"Minimum total cost ($).","example":0.1,"maximum":999999.99,"minimum":0},"example":0.1},{"name":"totalCostMax","in":"query","description":"Maximum total cost ($).","required":false,"schema":{"type":"number","description":"Maximum total cost ($).","example":5,"maximum":999999.99,"minimum":0},"example":5},{"name":"transactionId","in":"query","description":"Exact transaction ID match.","required":false,"schema":{"type":"string","description":"Exact transaction ID match.","example":"123e4567-e89b-12d3-a456-426614174000","maxLength":255,"minLength":1},"example":"123e4567-e89b-12d3-a456-426614174000"},{"name":"traceId","in":"query","description":"Exact trace ID match.","required":false,"schema":{"type":"string","description":"Exact trace ID match.","example":"fedcba98-7654-3210-fedc-ba9876543210","maxLength":255,"minLength":1},"example":"fedcba98-7654-3210-fedc-ba9876543210"},{"name":"traceType","in":"query","description":"Filter by trace type. Use 'unknown' for metrics without traceType.","required":false,"schema":{"type":"string","description":"Filter by trace type. Use 'unknown' for metrics without traceType.","example":"document_analysis","maxLength":255,"minLength":1},"example":"document_analysis"},{"name":"traceName","in":"query","description":"Filter by trace name.","required":false,"schema":{"type":"string","description":"Filter by trace name.","example":"my-trace-name","maxLength":255,"minLength":1},"example":"my-trace-name"},{"name":"organizationName","in":"query","description":"Filter by organization name.","required":false,"schema":{"type":"string","description":"Filter by organization name.","example":"Test Customer","maxLength":255,"minLength":1},"example":"Test Customer"},{"name":"subscriberEmail","in":"query","description":"Filter by subscriber email.","required":false,"schema":{"type":"string","description":"Filter by subscriber email.","example":"user@example.com"},"example":"user@example.com"},{"name":"subscriberId","in":"query","description":"Filter by subscriber ID.","required":false,"schema":{"type":"string","description":"Filter by subscriber ID.","example":"123e4567-e89b-12d3-a456-426614174001","maxLength":255,"minLength":1},"example":"123e4567-e89b-12d3-a456-426614174001"},{"name":"subscriptionId","in":"query","description":"Filter by subscription ID.","required":false,"schema":{"type":"string","description":"Filter by subscription ID.","example":"123e4567-e89b-12d3-a456-426614174002","maxLength":255,"minLength":1},"example":"123e4567-e89b-12d3-a456-426614174002"},{"name":"productId","in":"query","description":"Filter by product ID.","required":false,"schema":{"type":"string","description":"Filter by product ID.","example":"kB17z94","maxLength":255,"minLength":1},"example":"kB17z94"},{"name":"agent","in":"query","description":"Filter by agent name.","required":false,"schema":{"type":"string","description":"Filter by agent name.","example":"openai-basic-embeddings-node","maxLength":255,"minLength":1},"example":"openai-basic-embeddings-node"},{"name":"provider","in":"query","description":"Filter by AI provider.","required":false,"schema":{"type":"string","description":"Filter by AI provider.","example":"OPENAI","maxLength":255,"minLength":1},"example":"OPENAI"},{"name":"model","in":"query","description":"Filter by AI model.","required":false,"schema":{"type":"string","description":"Filter by AI model.","example":"gpt-4o-mini-2024-07-18","maxLength":255,"minLength":1},"example":"gpt-4o-mini-2024-07-18"},{"name":"modelSource","in":"query","description":"Filter by model source.","required":false,"schema":{"type":"string","description":"Filter by model source.","example":"OPENAI","maxLength":255,"minLength":1},"example":"OPENAI"},{"name":"taskType","in":"query","description":"Filter by task type.","required":false,"schema":{"type":"string","description":"Filter by task type.","example":"chat-completion","maxLength":255,"minLength":1},"example":"chat-completion"},{"name":"temperatureMin","in":"query","description":"Minimum temperature value.","required":false,"schema":{"type":"number","format":"double","description":"Minimum temperature value.","example":0.5,"maximum":2,"minimum":0},"example":0.5},{"name":"temperatureMax","in":"query","description":"Maximum temperature value.","required":false,"schema":{"type":"number","format":"double","description":"Maximum temperature value.","example":1,"maximum":2,"minimum":0},"example":1},{"name":"stopReason","in":"query","description":"Filter by stop reason.","required":false,"schema":{"type":"string","description":"Filter by stop reason.","enum":["END","END_SEQUENCE","TIMEOUT","TOKEN_LIMIT","COST_LIMIT","COMPLETION_LIMIT","ERROR","CANCELLED","CONTENT_FILTER","TOOL_CALL"],"example":"END"},"example":"END"},{"name":"errorReason","in":"query","description":"Filter by error reason.","required":false,"schema":{"type":"string","description":"Filter by error reason.","example":"UNRECOGNIZED_RESPONSE","maxLength":255,"minLength":1},"example":"UNRECOGNIZED_RESPONSE"},{"name":"responseQualityScoreMin","in":"query","description":"Minimum response quality score.","required":false,"schema":{"type":"number","description":"Minimum response quality score.","example":0.2,"maximum":1,"minimum":0},"example":0.2},{"name":"responseQualityScoreMax","in":"query","description":"Maximum response quality score.","required":false,"schema":{"type":"number","description":"Maximum response quality score.","example":0.8,"maximum":1,"minimum":0},"example":0.8},{"name":"credentialName","in":"query","description":"Filter by credential name.","required":false,"schema":{"type":"string","description":"Filter by credential name.","example":"globaltech-key","maxLength":255,"minLength":1},"example":"globaltech-key"},{"name":"systemFingerprint","in":"query","description":"Filter by system fingerprint.","required":false,"schema":{"type":"string","description":"Filter by system fingerprint.","example":"fp_44z789a1c23def456","maxLength":255,"minLength":1},"example":"fp_44z789a1c23def456"},{"name":"environment","in":"query","description":"Filter by environment (exact match).","required":false,"schema":{"type":"string","description":"Filter by environment (exact match).","example":"production","maxLength":255,"minLength":1},"example":"production"},{"name":"includeCodingAssistants","in":"query","description":"Whether to include coding assistant metrics (e.g. Claude Code, Gemini CLI). When false (default), coding assistant records are excluded from results.","required":false,"schema":{"type":"boolean","description":"Whether to include coding assistant metrics (e.g. Claude Code, Gemini CLI). When false (default), coding assistant records are excluded from results.","example":false},"example":false},{"name":"includeCodingAssistantProviders","in":"query","description":"Server-side coding assistant provider pricing policy. Accepted values: ClaudeCode, ClaudeCowork, CursorIde, GeminiCli, CodexCli, GithubCopilot. Providers in this list are treated as API-rate real spend and included on real-cost surfaces. An empty or omitted list treats coding assistant providers as subscription or seat-based usage and excludes them from real-cost defaults.","required":false,"schema":{"type":"array","description":"Server-side coding assistant provider pricing policy. Accepted values: ClaudeCode, ClaudeCowork, CursorIde, GeminiCli, CodexCli, GithubCopilot. Providers in this list are treated as API-rate real spend and included on real-cost surfaces. An empty or omitted list treats coding assistant providers as subscription or seat-based usage and excludes them from real-cost defaults.","example":["ClaudeCode","GeminiCli"],"items":{"type":"string","description":"Server-side coding assistant provider pricing policy. Accepted values: ClaudeCode, ClaudeCowork, CursorIde, GeminiCli, CodexCli, GithubCopilot. Providers in this list are treated as API-rate real spend and included on real-cost surfaces. An empty or omitted list treats coding assistant providers as subscription or seat-based usage and excludes them from real-cost defaults.","example":["ClaudeCode","GeminiCli"]}},"example":["ClaudeCode","GeminiCli"]},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["requestTime,DESC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Returns a paginated list of AI Completion Metric objects.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AICompletionMetricPagedModel_Read"},"examples":{"AI Completion Metrics List":{"description":"AI Completion Metrics List","value":{"_embedded":{"aICompletionMetricResourceList":[{"id":"l3Ka8j","resourceType":"ai.completion.metric","label":"txn-test-002","created":"2025-10-17T17:53:39.119Z","transactionId":"txn-test-002","model":"gpt-4-turbo","modelSource":"OPENAI","temperature":0.7,"responseQualityScore":95.5,"inputTokenCount":75,"outputTokenCount":125,"totalTokenCount":235,"stopReason":"END","totalCost":0.23,"costType":"AI","requestTime":"2025-10-17T17:35:00Z","responseTime":"2025-10-17T17:35:03Z","completionStartTime":"2025-10-17T17:35:00Z","provider":"OpenAI","traceId":"123e4567-e89b-12d3-a456-426614174000","transactionCount":4}]},"page":{"size":20,"totalElements":1,"totalPages":1,"number":0}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AICompletionMetricPagedModel_Read"},"examples":{"AI Completion Metrics List":{"description":"AI Completion Metrics List","value":{"_embedded":{"aICompletionMetricResourceList":[{"id":"l3Ka8j","resourceType":"ai.completion.metric","label":"txn-test-002","created":"2025-10-17T17:53:39.119Z","transactionId":"txn-test-002","model":"gpt-4-turbo","modelSource":"OPENAI","temperature":0.7,"responseQualityScore":95.5,"inputTokenCount":75,"outputTokenCount":125,"totalTokenCount":235,"stopReason":"END","totalCost":0.23,"costType":"AI","requestTime":"2025-10-17T17:35:00Z","responseTime":"2025-10-17T17:35:03Z","completionStartTime":"2025-10-17T17:35:00Z","provider":"OpenAI","traceId":"123e4567-e89b-12d3-a456-426614174000","transactionCount":4}]},"page":{"size":20,"totalElements":1,"totalPages":1,"number":0}}}}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - user is not authorized to view the team","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/completions/{id}":{"get":{"tags":["AI Completion Metrics"],"summary":"Get an AI Completion Metric by its Unique Identifier.","description":"Get an AI completion metric by its unique identifier.","operationId":"get_ai_completion_metric","parameters":[{"name":"id","in":"path","description":"Unique identifier of the AI completion metric. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Returns an AI Completion Metric object.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AICompletionMetricResource"},"examples":{"AI Completion Metric":{"description":"AI Completion Metric","value":{"id":"l3Ka8j","resourceType":"ai.completion.metric","label":"txn-test-002","created":"2025-10-17T17:53:39.119Z","transactionId":"txn-test-002","source":{"id":"qx1yRL4","resourceType":"source","label":"Default"},"team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"organization":{"id":"JMwZynr","resourceType":"organization","label":"org-123"},"model":"gpt-4-turbo","modelSource":"OPENAI","temperature":0.7,"responseQualityScore":95.5,"inputTokenCount":75,"outputTokenCount":125,"reasoningTokenCount":50,"totalTokenCount":235,"stopReason":"END","inputTokenCost":0.08,"outputTokenCost":0.12,"totalCost":0.23,"costType":"AI","requestTime":"2025-10-17T17:35:00Z","responseTime":"2025-10-17T17:35:03Z","completionStartTime":"2025-10-17T17:35:00Z","timeToFirstToken":250,"isStreamed":true,"requestDuration":3000,"provider":"OpenAI"}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AICompletionMetricResource"},"examples":{"AI Completion Metric":{"description":"AI Completion Metric","value":{"id":"l3Ka8j","resourceType":"ai.completion.metric","label":"txn-test-002","created":"2025-10-17T17:53:39.119Z","transactionId":"txn-test-002","source":{"id":"qx1yRL4","resourceType":"source","label":"Default"},"team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"organization":{"id":"JMwZynr","resourceType":"organization","label":"org-123"},"model":"gpt-4-turbo","modelSource":"OPENAI","temperature":0.7,"responseQualityScore":95.5,"inputTokenCount":75,"outputTokenCount":125,"reasoningTokenCount":50,"totalTokenCount":235,"stopReason":"END","inputTokenCost":0.08,"outputTokenCost":0.12,"totalCost":0.23,"costType":"AI","requestTime":"2025-10-17T17:35:00Z","responseTime":"2025-10-17T17:35:03Z","completionStartTime":"2025-10-17T17:35:00Z","timeToFirstToken":250,"isStreamed":true,"requestDuration":3000,"provider":"OpenAI"}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"AI metric not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/completions/{id}/prompts":{"get":{"tags":["AI Completion Metrics"],"summary":"Get prompt data for an AI completion","description":"\n            Returns only the prompt-related data for an AI completion metric.\n            This endpoint provides a focused view of just the prompt capture fields:\n            - systemPrompt: System instructions sent to the model\n            - inputMessages: User input messages (JSON array)\n            - outputResponse: Assistant output content\n            - promptsTruncated: Whether prompts were truncated due to size limits\n\n            Use this endpoint when you only need prompt data without the full completion details.\n\n            **Permission Required**: User must have the `canViewPromptData` permission enabled by a Tenant Administrator,\n            or be a System Administrator or Tenant Administrator (who have implicit access).\n        ","operationId":"get_ai_completion_prompts","parameters":[{"name":"id","in":"path","description":"Unique identifier of the AI completion metric. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Returns prompt data for the AI completion.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptDataResource"},"examples":{"Prompt Data":{"description":"Prompt Data","value":{"systemPrompt":"You are a helpful assistant.","inputMessages":"[{\"role\": \"user\", \"content\": \"Hello, how are you?\"}]","outputResponse":"I'm doing well, thank you for asking!","promptsTruncated":false}},"No Prompt Data":{"description":"No Prompt Data","value":{"promptsTruncated":false}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PromptDataResource"},"examples":{"Prompt Data":{"description":"Prompt Data","value":{"systemPrompt":"You are a helpful assistant.","inputMessages":"[{\"role\": \"user\", \"content\": \"Hello, how are you?\"}]","outputResponse":"I'm doing well, thank you for asking!","promptsTruncated":false}},"No Prompt Data":{"description":"No Prompt Data","value":{"promptsTruncated":false}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - user does not have permission to view prompt data. The canViewPromptData permission must be enabled by a Tenant Administrator.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"AI completion metric not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/completions/reference-data":{"get":{"tags":["AI Completion Metrics"],"summary":"Get reference data for AI completion metric search filters","description":"\n            Returns reference data for populating search filter dropdowns.\n            This includes:\n            - traceTypes: Dynamic list of trace types found in the team's data\n            - stopReasons: Static list of all possible stop reason values\n\n            Use this endpoint to populate dropdown options in search forms.\n        ","operationId":"get_ai_completion_reference_data","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Returns reference data for search filters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AICompletionMetricReferenceData"},"examples":{"Reference Data":{"description":"Reference Data","value":{"traceTypes":["chat","document_analysis","code_review"],"stopReasons":["END","END_SEQUENCE","TIMEOUT","TOKEN_LIMIT","COST_LIMIT","COMPLETION_LIMIT","ERROR","CANCELLED"]}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AICompletionMetricReferenceData"},"examples":{"Reference Data":{"description":"Reference Data","value":{"traceTypes":["chat","document_analysis","code_review"],"stopReasons":["END","END_SEQUENCE","TIMEOUT","TOKEN_LIMIT","COST_LIMIT","COMPLETION_LIMIT","ERROR","CANCELLED"]}}}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/call-count-metrics-by-agents":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Call Count Metrics By Agent","description":"Get call count metrics by agent","operationId":"get_call_count_metrics_by_agent","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results (e.g., TWELVE_MONTHS). Ignored if both startDate and endDate are provided. Defaults to TWELVE_MONTHS when no custom date range is specified.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"TWELVE_MONTHS"},{"name":"startDate","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with endDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with startDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"},{"name":"agents","in":"query","description":"Optional list of agent identifiers to include. Omit to include all agents.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Returns agent call count metrics over time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedAgentAIMetricsTimestampGroupResource"},"examples":{"Call Count Metrics by Agents":{"description":"Call Count Metrics by Agents","value":{"startTimestamp":1730419200000,"endTimestamp":1761168766596,"groups":[{"groupName":"code-review-agent","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1761168766596,"agent":"code-review-agent","metricResult":1,"metricType":"CALL_COUNT_BY_AGENT"}]}]}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/audio":{"get":{"tags":["AI Audio Metrics"],"summary":"List AI Audio Metrics by team","description":"\n            Retrieve a paginated list of AI audio metrics for a specified team.\n            Includes audio-specific fields like duration, character count, token counts, language, and voice.\n        ","operationId":"list_ai_audio_metrics","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"startDate","in":"query","description":"Filter start date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter start date/time in ISO 8601 format.","example":"2025-09-01T00:00:00Z"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"Filter end date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter end date/time in ISO 8601 format.","example":"2025-09-30T23:59:59Z"},"example":"2025-09-30T23:59:59Z"},{"name":"requestDurationMin","in":"query","description":"Minimum request duration (in milliseconds).","required":false,"schema":{"type":"integer","format":"int64","description":"Minimum request duration (in milliseconds).","example":500,"maximum":300000,"minimum":0},"example":500},{"name":"requestDurationMax","in":"query","description":"Maximum request duration (in milliseconds).","required":false,"schema":{"type":"integer","format":"int64","description":"Maximum request duration (in milliseconds).","example":10000,"maximum":300000,"minimum":0},"example":10000},{"name":"totalCostMin","in":"query","description":"Minimum total cost ($).","required":false,"schema":{"type":"number","description":"Minimum total cost ($).","example":0.1,"maximum":999999.99,"minimum":0},"example":0.1},{"name":"totalCostMax","in":"query","description":"Maximum total cost ($).","required":false,"schema":{"type":"number","description":"Maximum total cost ($).","example":5,"maximum":999999.99,"minimum":0},"example":5},{"name":"transactionId","in":"query","description":"Exact transaction ID match.","required":false,"schema":{"type":"string","description":"Exact transaction ID match.","example":"123e4567-e89b-12d3-a456-426614174000","maxLength":255,"minLength":1},"example":"123e4567-e89b-12d3-a456-426614174000"},{"name":"traceId","in":"query","description":"Exact trace ID match.","required":false,"schema":{"type":"string","description":"Exact trace ID match.","example":"fedcba98-7654-3210-fedc-ba9876543210","maxLength":255,"minLength":1},"example":"fedcba98-7654-3210-fedc-ba9876543210"},{"name":"traceType","in":"query","description":"Filter by trace type. Use 'unknown' for metrics without traceType.","required":false,"schema":{"type":"string","description":"Filter by trace type. Use 'unknown' for metrics without traceType.","example":"transcription","maxLength":255,"minLength":1},"example":"transcription"},{"name":"organizationName","in":"query","description":"Filter by consuming organization name.","required":false,"schema":{"type":"string","description":"Filter by consuming organization name.","example":"Test Customer","maxLength":255,"minLength":1},"example":"Test Customer"},{"name":"subscriberId","in":"query","description":"Filter by subscriber ID.","required":false,"schema":{"type":"string","description":"Filter by subscriber ID.","example":"sub_123abc","maxLength":255,"minLength":1},"example":"sub_123abc"},{"name":"subscriberEmail","in":"query","description":"Filter by subscriber email.","required":false,"schema":{"type":"string","description":"Filter by subscriber email.","example":"user@example.com","maxLength":255,"minLength":1},"example":"user@example.com"},{"name":"subscriptionId","in":"query","description":"Filter by subscription ID.","required":false,"schema":{"type":"string","description":"Filter by subscription ID.","example":"subscription_456def","maxLength":255,"minLength":1},"example":"subscription_456def"},{"name":"productId","in":"query","description":"Filter by product ID.","required":false,"schema":{"type":"string","description":"Filter by product ID.","example":"kB17z94","maxLength":255,"minLength":1},"example":"kB17z94"},{"name":"agent","in":"query","description":"Filter by agent name.","required":false,"schema":{"type":"string","description":"Filter by agent name.","example":"audio-agent","maxLength":255,"minLength":1},"example":"audio-agent"},{"name":"provider","in":"query","description":"Filter by AI provider.","required":false,"schema":{"type":"string","description":"Filter by AI provider.","example":"OPENAI","maxLength":255,"minLength":1},"example":"OPENAI"},{"name":"model","in":"query","description":"Filter by AI model.","required":false,"schema":{"type":"string","description":"Filter by AI model.","example":"whisper-1","maxLength":255,"minLength":1},"example":"whisper-1"},{"name":"modelSource","in":"query","description":"Filter by model source.","required":false,"schema":{"type":"string","description":"Filter by model source.","example":"OPENAI","maxLength":255,"minLength":1},"example":"OPENAI"},{"name":"errorReason","in":"query","description":"Filter by error reason.","required":false,"schema":{"type":"string","description":"Filter by error reason.","example":"AUDIO_TOO_LONG","maxLength":255,"minLength":1},"example":"AUDIO_TOO_LONG"},{"name":"operationSubtype","in":"query","description":"Filter by operation subtype.","required":false,"schema":{"type":"string","description":"Filter by operation subtype.","enum":["transcription","tts","translation","realtime"],"example":"transcription","maxLength":50,"minLength":1},"example":"transcription"},{"name":"environment","in":"query","description":"Filter by deployment environment.","required":false,"schema":{"type":"string","description":"Filter by deployment environment.","enum":["production","staging","development","test"],"example":"production","maxLength":50,"minLength":1},"example":"production"},{"name":"billingSkipped","in":"query","description":"Filter by whether billing was skipped.","required":false,"schema":{"type":"boolean","description":"Filter by whether billing was skipped.","example":false},"example":false},{"name":"durationSecondsMin","in":"query","description":"Minimum audio duration (in seconds).","required":false,"schema":{"type":"number","format":"double","description":"Minimum audio duration (in seconds).","example":1,"maximum":36000,"minimum":0},"example":1},{"name":"durationSecondsMax","in":"query","description":"Maximum audio duration (in seconds).","required":false,"schema":{"type":"number","format":"double","description":"Maximum audio duration (in seconds).","example":3600,"maximum":36000,"minimum":0},"example":3600},{"name":"characterCountMin","in":"query","description":"Minimum character count (for TTS).","required":false,"schema":{"type":"integer","format":"int64","description":"Minimum character count (for TTS).","example":100,"maximum":1000000,"minimum":0},"example":100},{"name":"characterCountMax","in":"query","description":"Maximum character count (for TTS).","required":false,"schema":{"type":"integer","format":"int64","description":"Maximum character count (for TTS).","example":10000,"maximum":1000000,"minimum":0},"example":10000},{"name":"inputAudioTokenCountMin","in":"query","description":"Minimum input audio token count.","required":false,"schema":{"type":"integer","format":"int64","description":"Minimum input audio token count.","example":100,"maximum":10000000,"minimum":0},"example":100},{"name":"inputAudioTokenCountMax","in":"query","description":"Maximum input audio token count.","required":false,"schema":{"type":"integer","format":"int64","description":"Maximum input audio token count.","example":100000,"maximum":10000000,"minimum":0},"example":100000},{"name":"outputAudioTokenCountMin","in":"query","description":"Minimum output audio token count.","required":false,"schema":{"type":"integer","format":"int64","description":"Minimum output audio token count.","example":100,"maximum":10000000,"minimum":0},"example":100},{"name":"outputAudioTokenCountMax","in":"query","description":"Maximum output audio token count.","required":false,"schema":{"type":"integer","format":"int64","description":"Maximum output audio token count.","example":100000,"maximum":10000000,"minimum":0},"example":100000},{"name":"language","in":"query","description":"Filter by language code.","required":false,"schema":{"type":"string","description":"Filter by language code.","example":"en","maxLength":10,"minLength":1},"example":"en"},{"name":"voice","in":"query","description":"Filter by voice name (for TTS).","required":false,"schema":{"type":"string","description":"Filter by voice name (for TTS).","example":"alloy","maxLength":50,"minLength":1},"example":"alloy"},{"name":"audioFormat","in":"query","description":"Filter by audio format.","required":false,"schema":{"type":"string","description":"Filter by audio format.","example":"mp3","maxLength":20,"minLength":1},"example":"mp3"},{"name":"quality","in":"query","description":"Filter by audio quality.","required":false,"schema":{"type":"string","description":"Filter by audio quality.","example":"hd","maxLength":20,"minLength":1},"example":"hd"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["requestTime,DESC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Returns a paginated list of AI Audio Metric objects.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAudioMetricPagedModel_Read"},"examples":{"AI Audio Metrics List":{"description":"AI Audio Metrics List","value":{"_embedded":{"aIAudioMetricResourceList":[{"id":"a3Ka8j","resourceType":"ai.audio.metric","label":"txn-audio-001","created":"2025-10-17T17:53:39.119Z","transactionId":"txn-audio-001","model":"whisper-1","provider":"OpenAI","totalCost":0.006,"requestTime":"2025-10-17T17:35:00Z","responseTime":"2025-10-17T17:35:05Z","requestDuration":5000,"operationSubtype":"transcription","durationSeconds":120.5,"language":"en"}]},"page":{"size":20,"totalElements":1,"totalPages":1,"number":0}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AIAudioMetricPagedModel_Read"},"examples":{"AI Audio Metrics List":{"description":"AI Audio Metrics List","value":{"_embedded":{"aIAudioMetricResourceList":[{"id":"a3Ka8j","resourceType":"ai.audio.metric","label":"txn-audio-001","created":"2025-10-17T17:53:39.119Z","transactionId":"txn-audio-001","model":"whisper-1","provider":"OpenAI","totalCost":0.006,"requestTime":"2025-10-17T17:35:00Z","responseTime":"2025-10-17T17:35:05Z","requestDuration":5000,"operationSubtype":"transcription","durationSeconds":120.5,"language":"en"}]},"page":{"size":20,"totalElements":1,"totalPages":1,"number":0}}}}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - user is not authorized to view the team","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/audio/{id}":{"get":{"tags":["AI Audio Metrics"],"summary":"Get an AI Audio Metric by ID","description":"Returns a single AI audio metric with all audio-specific fields.","operationId":"get_ai_audio_metric","parameters":[{"name":"id","in":"path","description":"Unique identifier of the AI audio metric. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Returns an AI Audio Metric object.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAudioMetricResource_Read"},"examples":{"AI Audio Metric":{"description":"AI Audio Metric","value":{"id":"a3Ka8j","resourceType":"ai.audio.metric","label":"txn-audio-001","created":"2025-10-17T17:53:39.119Z","transactionId":"txn-audio-001","model":"whisper-1","provider":"OpenAI","totalCost":0.006,"requestTime":"2025-10-17T17:35:00Z","responseTime":"2025-10-17T17:35:05Z","requestDuration":5000,"operationSubtype":"transcription","durationSeconds":120.5,"language":"en","responseFormat":"json","sampleRate":44100}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AIAudioMetricResource_Read"},"examples":{"AI Audio Metric":{"description":"AI Audio Metric","value":{"id":"a3Ka8j","resourceType":"ai.audio.metric","label":"txn-audio-001","created":"2025-10-17T17:53:39.119Z","transactionId":"txn-audio-001","model":"whisper-1","provider":"OpenAI","totalCost":0.006,"requestTime":"2025-10-17T17:35:00Z","responseTime":"2025-10-17T17:35:05Z","requestDuration":5000,"operationSubtype":"transcription","durationSeconds":120.5,"language":"en","responseFormat":"json","sampleRate":44100}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"AI audio metric not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/sources/metrics/ai/ai-keys":{"get":{"tags":["AI Completion Metrics"],"summary":"Get all keys for an team","description":"Get all keys for an team","operationId":"get_unique_keys_for_team","parameters":[{"name":"teamId","in":"query","required":true,"schema":{"type":"string"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"200":{"description":"The Keys","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedAIMetric"},"examples":{"AI Keys List (Empty)":{"description":"AI Keys List (Empty)","value":{"page":{"size":20,"totalElements":0,"totalPages":0,"number":0}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/agents":{"get":{"tags":["AI Completion Metrics"],"summary":"Get all agents for an team","description":"Get all agents for an team","operationId":"get_unique_agents_for_team","parameters":[{"name":"teamId","in":"query","required":true,"schema":{"type":"string"}},{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Pageable"}}],"responses":{"200":{"description":"The Agents","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedAIMetric"},"examples":{"Agents List":{"description":"Agents List","value":{"_embedded":{"stringList":["code-review-agent"]},"page":{"size":20,"totalElements":1,"totalPages":1,"number":0}}}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/metrics/ai/agents/call-count":{"get":{"tags":["AI Completion Metrics"],"summary":"Get Call Count Metrics By Agents Over Time","description":"Get call count metrics by agent over time (time series for charting request volume)","operationId":"get_call_count_metrics_by_agents_over_time","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Predefined time window to aggregate results (e.g., TWELVE_MONTHS). Ignored if both startDate and endDate are provided. Defaults to TWELVE_MONTHS when no custom date range is specified.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"TWELVE_MONTHS"},{"name":"startDate","in":"query","description":"Start of a custom date range in ISO 8601 format (e.g., 2025-09-01T00:00:00Z). Must be provided together with endDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"End of a custom date range in ISO 8601 format (e.g., 2025-09-30T23:59:59Z). Must be provided together with startDate. When both are provided, the period parameter is ignored and this custom range is used instead.","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"},{"name":"agents","in":"query","description":"Optional list of agent identifiers to include (e.g., 'claude-code'). Omit to include all agents.","required":false,"schema":{"type":"array","items":{"type":"string"}},"example":"claude-code"}],"responses":{"200":{"description":"Returns agent call count metrics over time.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedAgentAIMetricsTimestampGroupResource_Read"},"examples":{"Call Count Metrics by Agents Over Time":{"description":"Call Count Metrics by Agents Over Time","value":[{"startTimestamp":1730419200000,"endTimestamp":1733011199000,"groups":[{"groupName":"claude-code","metrics":[{"startTimestamp":1730419200000,"endTimestamp":1733011199000,"agent":"claude-code","metricResult":45,"metricType":"CALL_COUNT_BY_AGENT_OVER_TIME"}]}]}]}}}}},"400":{"description":"Invalid input data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/ai/models/{modelId}/pricing":{"get":{"tags":["AI Model Pricing"],"summary":"Get Pricing for AI Model","description":"Retrieve all pricing dimensions for an AI model, including both global and tenant-specific pricing.","operationId":"get_ai_model_pricing","parameters":[{"name":"modelId","in":"path","description":"Unique identifier of the AI model","required":true,"schema":{"type":"string"}},{"name":"teamId","in":"query","description":"Team (organization) ID for tenant-specific pricing lookup","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns the pricing information for the AI model","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingResponse_Read"}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"AI model not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/ai/models/{modelId}/pricing/coverage":{"get":{"tags":["AI Model Pricing"],"summary":"Get Pricing Coverage","description":"Get a summary of which billing units have pricing configured for an AI model.","operationId":"get_pricing_coverage","parameters":[{"name":"modelId","in":"path","description":"Unique identifier of the AI model","required":true,"schema":{"type":"string"}},{"name":"teamId","in":"query","description":"Team (organization) ID for tenant-specific pricing lookup","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns the pricing coverage summary","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingCoverageResource_Read"}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"AI model not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/ai/models/{id}/revisions":{"get":{"tags":["AI Models"],"summary":"Get AI Model Audit History","description":"Retrieves the audit history (revision log) for a tenant-specific AI model. Returns a paginated list of all pricing and configuration changes made to the model, including who made the change, when, and what values changed. Global models (those without an organization) return an empty history.","operationId":"get_ai_model_audit_history","parameters":[{"name":"id","in":"path","description":"The AI model id","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Successfully retrieved audit history","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionDataPagedModel_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/RevisionDataPagedModel_Read"}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - user is not authorized to view the AI model","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"AI model not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/sources/ai/models/rates":{"get":{"tags":["AI Models"],"summary":"Get AI Model Rates","description":"Returns live input/output pricing rates per million tokens for all AI models available to the team. Use these rates together with the modelBreakdown from GET /sources/metrics/ai/traces/metrics to calculate API-equivalent value.","operationId":"get_ai_model_rates","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Returns list of AI model rates","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIModelRatesResponse_Read"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found for the given teamId.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/sources/ai/models/providers":{"get":{"tags":["AI Models"],"summary":"Get Distinct AI Model Providers","description":"Returns the sorted distinct provider values across AI models available to the team (global catalog plus the team's custom models). Use this to populate provider filter dropdowns.","operationId":"get_ai_model_providers","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"modelType","in":"query","description":"Filter providers by model type. GLOBAL returns providers of global models only, CUSTOM returns providers of the team's custom models only. If omitted, returns providers across both.","required":false,"schema":{"type":"string","enum":["GLOBAL","CUSTOM"]}}],"responses":{"200":{"description":"Returns sorted list of distinct AI model providers.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found for the given teamId.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/sources/ai/models/name/{name}":{"get":{"tags":["AI Models"],"summary":"Get an AI Model by Name","description":"Get an AI model by its name.","operationId":"get_ai_model_by_name","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns the AI model.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIModelResource"},"examples":{"AI Model by Name":{"description":"AI Model by Name","value":{"id":"5BAERR","resourceType":"ai_model_metadata","label":"gpt-4","created":"2025-10-22T16:20:01.129Z","name":"gpt-4","provider":"OPENAI","inputCostPerToken":0.00003,"outputCostPerToken":0.00006,"cacheCreationCostPerInputToken":0,"cacheReadCostPerInputToken":0,"mode":"chat","supportFunctionCalling":true,"supportsPromptCaching":true,"supportsSystemMessages":true,"supportsToolChoice":true,"_links":{"self":{"href":"/profitstream/v2/api/sources/ai/models/5BAERR"}}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AIModelResource"},"examples":{"AI Model by Name":{"description":"AI Model by Name","value":{"id":"5BAERR","resourceType":"ai_model_metadata","label":"gpt-4","created":"2025-10-22T16:20:01.129Z","name":"gpt-4","provider":"OPENAI","inputCostPerToken":0.00003,"outputCostPerToken":0.00006,"cacheCreationCostPerInputToken":0,"cacheReadCostPerInputToken":0,"mode":"chat","supportFunctionCalling":true,"supportsPromptCaching":true,"supportsSystemMessages":true,"supportsToolChoice":true,"_links":{"self":{"href":"/profitstream/v2/api/sources/ai/models/5BAERR"}}}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"AI model not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/ai/anomaly/provider-dimensions":{"get":{"tags":["AI Anomaly"],"summary":"Get provider dimensions","description":"Returns available workspaces, API keys, providers, models, and supported metric/dimension/period capabilities for building provider-based alerts.","operationId":"getProviderDimensions","parameters":[{"name":"teamId","in":"query","description":"The organization ID","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"provider","in":"query","description":"Optional provider name to scope results","required":false,"schema":{"type":"string"},"example":"openai"}],"responses":{"200":{"description":"Provider dimensions retrieved successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderDimensionsResponse"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ProviderDimensionsResponse"}}}},"400":{"description":"Invalid request data","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderDimensionsResponse"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ProviderDimensionsResponse"}}}}}}},"/v2/api/sources/ai/anomaly/monitor/{id}":{"get":{"tags":["AI Anomaly"],"summary":"Get Metric from AI Anomaly","description":"Retrieve the metric to check for alert monitor from the AI anomaly builder.","operationId":"get_metric_from_builder","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Metric retrieved successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"type":"number"}},"application/hal+json":{"schema":{"type":"number"}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"AI Anomaly not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/sources/ai/alert":{"get":{"tags":["AI Alert"],"summary":"List AI Alerts","description":"Retrieve a paginated list of AI alerts.","operationId":"list_ai_alerts","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization) to filter results. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"type","in":"query","description":"Filters alerts by metric type. Must be one of the AIAlertMetricType enum values (e.g., TOTAL_COST, TOKEN_COUNT, ERROR_RATE).","required":false,"schema":{"type":"string"},"example":"TOTAL_COST"},{"name":"start","in":"query","description":"Start date for filtering alerts by trigger time. Format: ISO 8601 date string (YYYY-MM-DD). When provided with end date, returns only alerts triggered within the date range. When omitted, no start date filtering is applied.","required":false,"schema":{"type":"string"},"example":"2024-01-01"},{"name":"end","in":"query","description":"End date for filtering alerts by trigger time. Format: ISO 8601 date string (YYYY-MM-DD). When provided with start date, returns only alerts triggered within the date range. When omitted, no end date filtering is applied.","required":false,"schema":{"type":"string"},"example":"2024-12-31"},{"name":"anomalyId","in":"query","description":"Filters alerts by the associated AI anomaly ID. When provided, returns only alerts triggered by the specified anomaly. This is useful for tracking all alerts from a specific anomaly detection rule. Format: URL-safe encoded string.","required":false,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"ownerId","in":"query","description":"Filters alerts by the owner (user) ID who created or is responsible for the anomaly. When provided, returns only alerts from anomalies owned by the specified user. Format: URL-safe encoded string.","required":false,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"resolved","in":"query","description":"Filters alerts by their resolution status. When true, returns only resolved alerts. When false, returns only unresolved (active) alerts. When omitted, returns all alerts regardless of resolution status.","required":false,"schema":{"type":"boolean"},"example":false},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Returns a paginated list of AI Alert objects.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAlertResource_Read"},"examples":{"AI Alerts List":{"summary":"Paginated list of AI alerts","description":"Returns a paginated list of AI alerts with HAL structure","value":{"_embedded":{"aiAlertResourceList":[{"id":"alert-001","resourceType":"ai_alert_metadata","label":"ai_alert_metadata","created":"2025-10-23T15:30:00.000Z","updated":"2025-10-23T15:30:00.000Z","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"anomaly":{"id":"anomaly-001","resourceType":"ai_anomaly_metadata","label":"High Cost Alert","metricType":"TOTAL_COST","threshold":100},"triggeredValue":150.5,"resolved":false,"triggeredTimestamp":"2025-10-23T15:30:00.000Z","_links":{"self":{"href":"/profitstream/v2/api/sources/ai/alert/alert-001"}}},{"id":"alert-002","resourceType":"ai_alert_metadata","label":"ai_alert_metadata","created":"2025-10-22T10:15:00.000Z","updated":"2025-10-23T14:00:00.000Z","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"anomaly":{"id":"anomaly-002","resourceType":"ai_anomaly_metadata","label":"Token Usage Spike","metricType":"TOKEN_COUNT","threshold":50000},"triggeredValue":75000,"resolved":true,"resolvedTimestamp":"2025-10-23T14:00:00.000Z","triggeredTimestamp":"2025-10-22T10:15:00.000Z","_links":{"self":{"href":"/profitstream/v2/api/sources/ai/alert/alert-002"}}}]},"page":{"size":2,"totalElements":2,"totalPages":1,"number":0}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AIAlertResource_Read"},"examples":{"AI Alerts List":{"summary":"Paginated list of AI alerts","description":"Returns a paginated list of AI alerts with HAL structure","value":{"_embedded":{"aiAlertResourceList":[{"id":"alert-001","resourceType":"ai_alert_metadata","label":"ai_alert_metadata","created":"2025-10-23T15:30:00.000Z","updated":"2025-10-23T15:30:00.000Z","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"anomaly":{"id":"anomaly-001","resourceType":"ai_anomaly_metadata","label":"High Cost Alert","metricType":"TOTAL_COST","threshold":100},"triggeredValue":150.5,"resolved":false,"triggeredTimestamp":"2025-10-23T15:30:00.000Z","_links":{"self":{"href":"/profitstream/v2/api/sources/ai/alert/alert-001"}}},{"id":"alert-002","resourceType":"ai_alert_metadata","label":"ai_alert_metadata","created":"2025-10-22T10:15:00.000Z","updated":"2025-10-23T14:00:00.000Z","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"anomaly":{"id":"anomaly-002","resourceType":"ai_anomaly_metadata","label":"Token Usage Spike","metricType":"TOKEN_COUNT","threshold":50000},"triggeredValue":75000,"resolved":true,"resolvedTimestamp":"2025-10-23T14:00:00.000Z","triggeredTimestamp":"2025-10-22T10:15:00.000Z","_links":{"self":{"href":"/profitstream/v2/api/sources/ai/alert/alert-002"}}}]},"page":{"size":2,"totalElements":2,"totalPages":1,"number":0}}}}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - user is not authorized to view the organization's AI alerts","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Organization not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/sources/ai/alert/{id}":{"get":{"tags":["AI Alert"],"summary":"Get AI Alert","description":"Retrieve an AI alert by its unique identifier.","operationId":"get_ai_alert","parameters":[{"name":"id","in":"path","description":"Unique identifier of the AI alert to retrieve. This is the Revenium-generated ID returned when the AI alert was triggered, visible in the AI alert list endpoint, and used in all AI alert-related API operations. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Returns an AI Alert object.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIAlertResource"},"examples":{"AI Alert":{"description":"AI Alert","value":{"id":"alert-001","resourceType":"ai_alert_metadata","label":"ai_alert_metadata","created":"2025-10-23T15:30:00.000Z","updated":"2025-10-23T15:30:00.000Z","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"anomaly":{"id":"anomaly-001","resourceType":"ai_anomaly_metadata","label":"High Cost Alert","metricType":"TOTAL_COST","threshold":100},"triggeredValue":150.5,"resolved":false,"triggeredTimestamp":"2025-10-23T15:30:00.000Z","_links":{"self":{"href":"/profitstream/v2/api/sources/ai/alert/alert-001"}}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/AIAlertResource"},"examples":{"AI Alert":{"description":"AI Alert","value":{"id":"alert-001","resourceType":"ai_alert_metadata","label":"ai_alert_metadata","created":"2025-10-23T15:30:00.000Z","updated":"2025-10-23T15:30:00.000Z","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"anomaly":{"id":"anomaly-001","resourceType":"ai_anomaly_metadata","label":"High Cost Alert","metricType":"TOTAL_COST","threshold":100},"triggeredValue":150.5,"resolved":false,"triggeredTimestamp":"2025-10-23T15:30:00.000Z","_links":{"self":{"href":"/profitstream/v2/api/sources/ai/alert/alert-001"}}}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - user is not authorized to view the organization's AI alerts","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"AI Alert not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/skills":{"get":{"tags":["Skills"],"summary":"List skills with usage","description":"Get a paginated list of the team's Claude Code skills with their aggregated usage (cost, calls, traces) over the period. Doubles as the skill catalog and the cost-by-skill report.","operationId":"listSkills","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Time period for analysis. Defaults to THIRTY_DAYS.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["totalCost,DESC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Returns a paginated list of skills with usage.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillUsagePagedModel_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SkillUsagePagedModel_Read"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Validation failed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/skills/{skillId}":{"get":{"tags":["Skills"],"summary":"Get skill detail","description":"Get usage detail for a single skill (cost, calls, traces, first/last seen) over the period.","operationId":"getSkillDetail","parameters":[{"name":"skillId","in":"path","description":"The skill identifier (Revenium hashid).","required":true,"schema":{"type":"string"},"example":"JMwX9g4"},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Time period for analysis. Defaults to THIRTY_DAYS.","required":false,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]}}],"responses":{"200":{"description":"Returns skill usage detail.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillUsageResource_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SkillUsageResource_Read"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Skill or team not found.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Validation failed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/signup/status":{"get":{"tags":["Signup"],"summary":"Get the caller's signup status","description":"Returns the caller's current state in the domain-join flow, derived from their verified email. Never reveals tenant identity.","operationId":"get_signup_status","responses":{"200":{"description":"Signup status","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupStatusResponse"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/SignupStatusResponse"}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid Bearer token","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/reports/chart-builder/available-data":{"get":{"tags":["Chart Builder"],"summary":"Get available chart builder data options","description":"Provides all available metrics, entity types, and grouping options for chart creation","operationId":"get_chart_builder_available_data","parameters":[{"name":"teamId","in":"query","description":"Team identifier for scoping available data","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Available chart builder data options","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartBuilderAvailableDataResource"},"examples":{"Available Chart Data":{"description":"Available Chart Data","value":{"baseMetrics":[{"value":"totalCost","label":"Total Cost","description":"Financial cost of AI operations","unit":"currency","supportedCalculations":["total","average","per-entity","per-request","per-token"],"requiresRevenue":false},{"value":"requestCount","label":"Request Count","description":"Number of API requests made","unit":"count","supportedCalculations":["total","average","per-entity","median","maximum"],"requiresRevenue":false},{"value":"tokenCount","label":"Token Count","description":"Number of tokens processed","unit":"count","supportedCalculations":["total","average","per-entity","per-request","median","maximum"],"requiresRevenue":false}],"calculationTypes":[{"value":"total","label":"Total","description":"Sum of all values","requiresEntityType":false},{"value":"average","label":"Average","description":"Mean of individual values","requiresEntityType":false},{"value":"per-entity","label":"Per-Entity Average","description":"Total metric divided by number of entities","requiresEntityType":true}],"entityTypes":[{"value":"customer","label":"Customer","description":"Group by customer organizations"},{"value":"model","label":"Model","description":"Group by AI models"},{"value":"provider","label":"Provider","description":"Group by AI providers"}],"groupByOptions":[{"value":"none","label":"No Grouping","description":"Single aggregated series"},{"value":"model","label":"By Model","description":"Group by AI models"}],"grainOptions":[{"value":"auto","label":"Auto (Recommended)","description":"Automatically determine optimal granularity based on date range"},{"value":"day","label":"Daily","description":"Aggregate data by day"},{"value":"month","label":"Monthly","description":"Aggregate data by month"}]}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ChartBuilderAvailableDataResource"},"examples":{"Available Chart Data":{"description":"Available Chart Data","value":{"baseMetrics":[{"value":"totalCost","label":"Total Cost","description":"Financial cost of AI operations","unit":"currency","supportedCalculations":["total","average","per-entity","per-request","per-token"],"requiresRevenue":false},{"value":"requestCount","label":"Request Count","description":"Number of API requests made","unit":"count","supportedCalculations":["total","average","per-entity","median","maximum"],"requiresRevenue":false},{"value":"tokenCount","label":"Token Count","description":"Number of tokens processed","unit":"count","supportedCalculations":["total","average","per-entity","per-request","median","maximum"],"requiresRevenue":false}],"calculationTypes":[{"value":"total","label":"Total","description":"Sum of all values","requiresEntityType":false},{"value":"average","label":"Average","description":"Mean of individual values","requiresEntityType":false},{"value":"per-entity","label":"Per-Entity Average","description":"Total metric divided by number of entities","requiresEntityType":true}],"entityTypes":[{"value":"customer","label":"Customer","description":"Group by customer organizations"},{"value":"model","label":"Model","description":"Group by AI models"},{"value":"provider","label":"Provider","description":"Group by AI providers"}],"groupByOptions":[{"value":"none","label":"No Grouping","description":"Single aggregated series"},{"value":"model","label":"By Model","description":"Group by AI models"}],"grainOptions":[{"value":"auto","label":"Auto (Recommended)","description":"Automatically determine optimal granularity based on date range"},{"value":"day","label":"Daily","description":"Aggregate data by day"},{"value":"month","label":"Monthly","description":"Aggregate data by month"}]}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/refunds":{"get":{"tags":["Refund"],"summary":"List Refunds by Team","description":"Retrieve a paginated list of refunds for a specified team using RefundSearchParams filters.","operationId":"list_refunds","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization) to filter by. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"startDate","in":"query","description":"Filter start date/time in ISO 8601 format (e.g., 2025-09-01T00:00:00Z).","required":false,"schema":{"type":"string","description":"Filter start date/time in ISO 8601 format (e.g., 2025-09-01T00:00:00Z).","example":"2025-09-01T00:00:00Z"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"Filter end date/time in ISO 8601 format (e.g., 2025-09-30T23:59:59Z).","required":false,"schema":{"type":"string","description":"Filter end date/time in ISO 8601 format (e.g., 2025-09-30T23:59:59Z).","example":"2025-09-30T23:59:59Z"},"example":"2025-09-30T23:59:59Z"},{"name":"minimum","in":"query","description":"Filter by a minimum refund amount.","required":false,"schema":{"type":"number","format":"double","description":"Filter by a minimum refund amount.","example":10,"minimum":0},"example":10},{"name":"maximum","in":"query","description":"Filter by a maximum refund amount.","required":false,"schema":{"type":"number","format":"double","description":"Filter by a maximum refund amount.","example":1000,"minimum":0},"example":1000},{"name":"query","in":"query","description":"Full-text search query applied to refund notes.","required":false,"schema":{"type":"string","description":"Full-text search query applied to refund notes."}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Returns a paginated list of Refund objects.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundPagedModel_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/RefundPagedModel_Read"}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - user is not authorized to view the team","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/refunds/{id}":{"get":{"tags":["Refund"],"summary":"Get a Refund by ID","description":"Retrieves a refund by its unique identifier.","operationId":"get_refund","parameters":[{"name":"id","in":"path","description":"Unique identifier of the refund to retrieve. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"3kTMd"}],"responses":{"200":{"description":"Returns the Refund object.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundResource_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/RefundResource_Read"}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Refund not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/products/{id}/changelogs":{"get":{"tags":["Products"],"summary":"Get Product Audit History","description":"Retrieves the audit history for a specific product with pagination.","operationId":"get_product_audit_history","parameters":[{"name":"id","in":"path","description":"The product id","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Successfully retrieved audit history","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionDataPagedModel_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/RevisionDataPagedModel_Read"}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - user is not authorized to view the product","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Product not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/period-charges":{"get":{"tags":["Period Charges"],"summary":"List Period Charges (keyset/cursor)","description":"Canonical keyset-paginated list of period charges for an organization. Returns up to `size` items in `_embedded.periodChargeResourceList` plus an opaque `cursor` (top-level, `null` on the last page) and a `hasMore` flag — no `totalElements`, no `totalPages`. Pass the previous response's `cursor` back as the `cursor` query param to fetch the next page. Replaces the prior offset/`PagedModel` contract and the deprecated `/period-charges/cursor` sibling. Optional `invoiceId` scopes to a single invoice; optional `startDate`/`endDate` filter on the `created` timestamp.","operationId":"list_period_charges","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization) to list period charges for. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"invoiceId","in":"query","description":"Optional invoice identifier to filter period charges. Format: Revenium hashid (URL-safe encoded string).","required":false,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"startDate","in":"query","description":"Inclusive lower bound for the `created` timestamp in ISO 8601 format. Must be paired with `endDate`.","required":false,"schema":{"type":"string"},"example":"2025-10-01T00:00:00Z"},{"name":"endDate","in":"query","description":"Inclusive upper bound for the `created` timestamp in ISO 8601 format. Must be paired with `startDate`.","required":false,"schema":{"type":"string"},"example":"2025-10-31T23:59:59Z"},{"name":"cursor","in":"query","description":"Opaque cursor from the previous response's top-level `cursor`. Omit for the first page.","required":false,"schema":{"type":"string"}},{"name":"size","in":"query","description":"Page size. Clamped to [1, 200].","required":false,"schema":{"type":"integer","format":"int32","default":50},"example":50}],"responses":{"200":{"description":"Returns a cursor-paginated list of period charge objects.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodChargeKeysetPage_Read"},"examples":{"Period Charges Keyset Page":{"description":"Period Charges Keyset Page","value":{"_embedded":{"periodChargeResourceList":[{"id":"charge-001","resourceType":"period_charge","label":"October 2025 Charges","created":"2025-10-23T19:29:00.000Z","updated":"2025-10-23T19:29:00.000Z","organization":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"periodStart":"2025-10-01","periodEnd":"2025-10-31","amount":2500,"currency":"USD","status":"BILLED","_links":{"self":{"href":"/profitstream/v2/api/period-charges/charge-001"}}}]},"hasMore":true,"cursor":"MTcyOTcxMjE0MDAwMHwxMjM0NTY"}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PeriodChargeKeysetPage_Read"},"examples":{"Period Charges Keyset Page":{"description":"Period Charges Keyset Page","value":{"_embedded":{"periodChargeResourceList":[]},"hasMore":false}}}}}},"400":{"description":"Invalid request (e.g. malformed cursor, mismatched date params, invalid date format)","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - user is not authorized to view the organization","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Organization or invoice not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/period-charges/{id}":{"get":{"tags":["Period Charges"],"summary":"Get a Period Charge by ID","description":"Get a period charge by its unique identifier.","operationId":"get_period_charge","parameters":[{"name":"id","in":"path","description":"Unique identifier of the period charge to retrieve. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Returns a period charge object.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodChargeResource"},"examples":{"Period Charge":{"description":"Period Charge","value":{"id":"charge-001","resourceType":"period_charge","label":"October 2025 Charges","created":"2025-10-23T19:29:00.000Z","updated":"2025-10-23T19:29:00.000Z","organization":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"periodStart":"2025-10-01","periodEnd":"2025-10-31","amount":2500,"currency":"USD","status":"BILLED","_links":{"self":{"href":"/profitstream/v2/api/period-charges/charge-001"}}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PeriodChargeResource"},"examples":{"Period Charge":{"description":"Period Charge","value":{"id":"charge-001","resourceType":"period_charge","label":"October 2025 Charges","created":"2025-10-23T19:29:00.000Z","updated":"2025-10-23T19:29:00.000Z","organization":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"periodStart":"2025-10-01","periodEnd":"2025-10-31","amount":2500,"currency":"USD","status":"BILLED","_links":{"self":{"href":"/profitstream/v2/api/period-charges/charge-001"}}}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"Period charge not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/organizations/{id}/tags":{"get":{"tags":["Organizations"],"summary":"Retrieve all Tags Associated with an Organization","description":"Retrieve all tags associated with an organization","operationId":"get_organization_tags","parameters":[{"name":"id","in":"path","description":"Unique identifier of the organization. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"The tags associated with the specified organization","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}},"examples":{"Empty Tags List":{"summary":"Organization with no tags","description":"Response when organization has no associated tags","value":[]},"Tags List":{"summary":"Organization with tags","description":"Response with multiple tags associated with organization","value":["enterprise","production","api"]}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Organization not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/organizations/parent/{parentId}":{"get":{"tags":["Organizations"],"summary":"List Child Organizations","description":"Retrieve a paginated list of child organizations for a parent organization.","operationId":"list_organizations_by_parent","parameters":[{"name":"parentId","in":"path","description":"Unique identifier of the parent organization. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"isDemo","in":"query","description":"Toggle to include demo organizations","required":false,"schema":{"type":"boolean"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Paged list of organizations","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationPagedModel"},"examples":{"Child Organizations List":{"summary":"Paginated list of child organizations","description":"Response with paginated list of organizations under a parent","value":{"_embedded":{"organizationResourceList":[{"id":"JMwZynr","resourceType":"organization","label":"org-123","created":"2025-10-17T17:53:36.255Z","updated":"2025-10-17T17:53:37.457Z","name":"org-123","currency":"USD","types":["CONSUMER"],"tenant":{"id":"Ag8nd4k","resourceType":"tenant","label":"Example Tenant"},"_links":{"self":{"href":"/profitstream/v2/api/organizations/JMwZynr"}}}]},"page":{"size":2,"totalElements":6,"totalPages":3,"number":0}}}}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - user is not authorized to view the tenant","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Tenant not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/org-units/unassigned-subscribers":{"get":{"tags":["Org Units"],"summary":"List unassigned subscribers","description":"Lists users in the current organization with no open primary org-unit membership.","operationId":"listUnassignedSubscribers","responses":{"200":{"description":"Unassigned subscribers returned","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UnassignedSubscriberResponse_Read"}}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/jobs/{agenticJobId}/transactions":{"get":{"tags":["Jobs"],"summary":"Get Job Transactions","description":"Get individual AI transactions for a job, ordered by time. Used for waterfall timeline visualization of job execution.","operationId":"get_job_transactions","parameters":[{"name":"agenticJobId","in":"path","description":"User-supplied external identifier for the job.","required":true,"schema":{"type":"string"},"example":"loan-app-12345"},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Returns job transactions.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobTimelineResource_Read"},"examples":{"Job transactions response":{"summary":"Top-level shape: { transactions: [...], totalCount: N }","description":"Job transactions response","value":{"transactions":[{"transactionId":"txn-abc123","timestamp":"2026-04-26T04:16:31.874Z","agent":"loan-document-classifier","model":"claude-3-5-haiku-latest","provider":"anthropic","duration":5207,"cost":0.010468,"inputTokens":7693,"outputTokens":555,"totalTokens":8248,"status":"success"}],"totalCount":1}}}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Job not found.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/jobs/{agenticJobId}/roi":{"get":{"tags":["Jobs"],"summary":"Get Job ROI","description":"Get ROI metrics for a single job including cost, outcome, and token usage.","operationId":"get_job_roi","parameters":[{"name":"agenticJobId","in":"path","description":"User-supplied external identifier for the job.","required":true,"schema":{"type":"string"},"example":"loan-app-12345"},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Returns job ROI metrics.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobROIResource_Read"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Job not found.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/jobs/{agenticJobId}/outcome/history":{"get":{"tags":["Jobs"],"summary":"Get Outcome History","description":"Get the full update history for a job's outcome, ordered by sequence. Sequence 1 is the initial report; sequence 2+ are updates. Returns an empty list if no outcome has been reported.","operationId":"get_job_outcome_history","parameters":[{"name":"agenticJobId","in":"path","description":"User-supplied external identifier for the job.","required":true,"schema":{"type":"string"},"example":"loan-app-12345"},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Returns ordered outcome revision history.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JobOutcomeRevisionResource_Read"}}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Job not found.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/jobs/types":{"get":{"tags":["Jobs"],"summary":"Get Job Types","description":"Get distinct job type strings for the organization, sorted alphabetically. Null types are excluded. Use this to populate job type filter dropdowns.","operationId":"get_job_types","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Returns list of distinct job types.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - semantic validation failed.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/jobs/conversion-funnel":{"get":{"tags":["Jobs"],"summary":"Get Conversion Funnel","description":"Get conversion funnel data (total jobs, successful jobs, converted jobs) with optional date range and job type filters. Used for the ROI Dashboard Overview tab.","operationId":"get_conversion_funnel","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"startDate","in":"query","description":"Filter start date/time in ISO 8601 format (on job created date).","required":false,"schema":{"type":"string"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"Filter end date/time in ISO 8601 format (on job created date).","required":false,"schema":{"type":"string"},"example":"2025-09-30T23:59:59Z"},{"name":"jobType","in":"query","description":"Filter by job type (case-insensitive exact match).","required":false,"schema":{"type":"string"},"example":"loan_processing"},{"name":"environment","in":"query","description":"Filter by environment (case-insensitive exact match).","required":false,"schema":{"type":"string"},"example":"production"}],"responses":{"200":{"description":"Returns conversion funnel data.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionFunnelResource_Read"}}}},"400":{"description":"Invalid request parameters.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - User does not have access to the requested team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/invoices":{"get":{"tags":["Invoice"],"summary":"List Invoices by Team","description":"Retrieve a paginated list of invoices for a specified team using InvoiceSearchParams filters.","operationId":"list_invoices","parameters":[{"name":"invoiceNumber","in":"query","description":"The invoice number","required":false,"schema":{"type":"string","description":"The invoice number"}},{"name":"startDate","in":"query","description":"Filter start date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter start date/time in ISO 8601 format.","example":"2025-09-01T00:00:00Z"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"Filter end date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter end date/time in ISO 8601 format.","example":"2025-09-01T00:00:00Z"},"example":"2025-09-01T00:00:00Z"},{"name":"userIds","in":"query","description":"Filter by a list of user IDs.","required":false,"schema":{"type":"array","description":"Filter by a list of user IDs.","items":{"type":"string","description":"Filter by a list of user IDs."}}},{"name":"organizationIds","in":"query","description":"Filter by a list of consuming organization IDs.","required":false,"schema":{"type":"array","description":"Filter by a list of consuming organization IDs.","items":{"type":"string","description":"Filter by a list of consuming organization IDs."}}},{"name":"productIds","in":"query","description":"Filter by a list of product IDs.","required":false,"schema":{"type":"array","description":"Filter by a list of product IDs.","items":{"type":"string","description":"Filter by a list of product IDs."}}},{"name":"startingAmount","in":"query","description":"Filter by a starting amount.","required":false,"schema":{"type":"integer","format":"int64","description":"Filter by a starting amount.","minimum":0}},{"name":"endingAmount","in":"query","description":"Filter by an ending amount.","required":false,"schema":{"type":"integer","format":"int64","description":"Filter by an ending amount.","minimum":0}},{"name":"accountId","in":"query","description":"Filter by a specific account ID.","required":false,"schema":{"type":"string","description":"Filter by a specific account ID."}},{"name":"accountName","in":"query","description":"Filter by account name.","required":false,"schema":{"type":"string","description":"Filter by account name."}},{"name":"accountNumber","in":"query","description":"Filter by account number.","required":false,"schema":{"type":"string","description":"Filter by account number."}},{"name":"payStates","in":"query","description":"Filter by invoice pay state(s). Accepts a single value or a comma-separated list.","required":false,"schema":{"type":"array","description":"Filter by invoice pay state(s). Accepts a single value or a comma-separated list.","example":"PAID,UNPAID","items":{"type":"string","description":"Filter by invoice pay state(s). Accepts a single value or a comma-separated list.","enum":["PAID","UNPAID","PARTIALLY_PAID","OVER_PAID","INVOICE_ONLY"],"example":"PAID,UNPAID"}},"example":"PAID,UNPAID"},{"name":"states","in":"query","description":"Filter by invoice state(s). Accepts a single value or a comma-separated list.","required":false,"schema":{"type":"array","description":"Filter by invoice state(s). Accepts a single value or a comma-separated list.","example":"FINALIZED,ISSUED","items":{"type":"string","description":"Filter by invoice state(s). Accepts a single value or a comma-separated list.","enum":["DRAFT","FINALIZED","CLOSED","ISSUED","PAID","PARTIALLY_PAID"],"example":"FINALIZED,ISSUED"}},"example":"FINALIZED,ISSUED"},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization) to filter by. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Returns a paginated list of Invoice objects.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicePagedModel_Read"},"examples":{"Invoices List":{"description":"Invoices List","value":{"_embedded":{"invoiceResourceList":[{"id":"inv-001","resourceType":"invoice","label":"INV-2025-001","created":"2025-10-23T19:17:00.000Z","updated":"2025-10-23T19:17:00.000Z","invoiceNumber":"INV-2025-001","status":"ISSUED","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"invoiceDate":"2025-10-23","dueDate":"2025-11-23","totalAmount":1500,"currency":"USD","_links":{"self":{"href":"/profitstream/v2/api/invoices/inv-001"}}}]},"page":{"size":20,"totalElements":1,"totalPages":1,"number":0}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/InvoicePagedModel_Read"},"examples":{"Invoices List":{"description":"Invoices List","value":{"_embedded":{"invoiceResourceList":[{"id":"inv-001","resourceType":"invoice","label":"INV-2025-001","created":"2025-10-23T19:17:00.000Z","updated":"2025-10-23T19:17:00.000Z","invoiceNumber":"INV-2025-001","status":"ISSUED","team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"invoiceDate":"2025-10-23","dueDate":"2025-11-23","totalAmount":1500,"currency":"USD","_links":{"self":{"href":"/profitstream/v2/api/invoices/inv-001"}}}]},"page":{"size":20,"totalElements":1,"totalPages":1,"number":0}}}}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - user is not authorized to view the team","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/invoices/{id}":{"get":{"tags":["Invoice"],"summary":"Get an Invoice by ID","description":"Get an invoice by its unique identifier.","operationId":"get_invoice","parameters":[{"name":"id","in":"path","description":"Unique identifier of the invoice to retrieve. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Returns an Invoice object.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResource"},"examples":{"Invoice":{"description":"Invoice","value":{"id":"4AyWgBN","resourceType":"invoice","label":"INV-2025-001","created":"2025-10-23T19:17:00.000Z","updated":"2025-10-23T19:17:00.000Z","invoiceNumber":"INV-2025-001","state":"ISSUED","product":{"id":"3BygBOL","resourceType":"product","label":"Premium API Product"},"subscription":{"id":"jM7BRwj","resourceType":"subscription","label":"Premium Monthly Subscription"},"organization":{"id":"JMwZBdZ","resourceType":"organization","label":"Acme Corporation"},"subscriptionOwner":{"id":"br7rPzx","resourceType":"user","label":"user@example.com"},"team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"account":{"id":"acc-001","resourceType":"account","label":"ACC-12345"},"accountState":"ACTIVATED","accountNumber":"ACC-12345","startDate":"2025-10-01T00:00:00.000Z","endDate":"2025-10-31T23:59:59.000Z","totalAmount":1500,"totalAdjusted":1425,"totalCallCount":50000,"totalFreeCallCount":5000,"totalRefund":75,"invoiceJobId":"job-1234","paymentProvider":"STRIPE","currency":"USD","invoicePayStatus":"PAID","totalPaidAmount":1425,"paymentSource":"PAYMENT_VIA_PAYMENT_PROVIDER","isDemo":false,"issued":"2025-10-23T19:17:00.000Z","finalized":"2025-10-23T19:17:00.000Z","_links":{"self":{"href":"/profitstream/v2/api/invoices/4AyWgBN"}}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/InvoiceResource"},"examples":{"Invoice":{"description":"Invoice","value":{"id":"4AyWgBN","resourceType":"invoice","label":"INV-2025-001","created":"2025-10-23T19:17:00.000Z","updated":"2025-10-23T19:17:00.000Z","invoiceNumber":"INV-2025-001","state":"ISSUED","product":{"id":"3BygBOL","resourceType":"product","label":"Premium API Product"},"subscription":{"id":"jM7BRwj","resourceType":"subscription","label":"Premium Monthly Subscription"},"organization":{"id":"JMwZBdZ","resourceType":"organization","label":"Acme Corporation"},"subscriptionOwner":{"id":"br7rPzx","resourceType":"user","label":"user@example.com"},"team":{"id":"XPozX1E","resourceType":"organization","label":"Example Team Name"},"account":{"id":"acc-001","resourceType":"account","label":"ACC-12345"},"accountState":"ACTIVATED","accountNumber":"ACC-12345","startDate":"2025-10-01T00:00:00.000Z","endDate":"2025-10-31T23:59:59.000Z","totalAmount":1500,"totalAdjusted":1425,"totalCallCount":50000,"totalFreeCallCount":5000,"totalRefund":75,"invoiceJobId":"job-1234","paymentProvider":"STRIPE","currency":"USD","invoicePayStatus":"PAID","totalPaidAmount":1425,"paymentSource":"PAYMENT_VIA_PAYMENT_PROVIDER","isDemo":false,"issued":"2025-10-23T19:17:00.000Z","finalized":"2025-10-23T19:17:00.000Z","_links":{"self":{"href":"/profitstream/v2/api/invoices/4AyWgBN"}}}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Invoice not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/invoices/{id}/download":{"get":{"tags":["Invoice"],"summary":"Download an Invoice as PDF or CSV","description":"Downloads the invoice with the specified ID as either a PDF or CSV. Use `format=pdf` (default) or `format=csv`.","operationId":"download_invoice","parameters":[{"name":"id","in":"path","description":"Unique identifier of the invoice to download. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"format","in":"query","description":"Output format. Supported values: pdf (default), csv.","required":false,"schema":{"type":"string","default":"pdf"},"example":"pdf"}],"responses":{"200":{"description":"Returns the invoice file payload (application/pdf or text/csv).","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/pdf":{"schema":{"type":"string","format":"binary"}},"text/csv":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid request - unsupported format value","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Invoice not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/invoices/unpaid-totals":{"get":{"tags":["Invoice"],"summary":"Get unpaid invoice totals for a team","description":"Returns the count and total outstanding amount of unpaid (UNPAID + PARTIALLY_PAID) invoices owned by the specified team. Replaces the V1 paged response so the frontend does not need to client-side aggregate and pagination cannot distort the displayed total.","operationId":"get_unpaid_totals","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization) to aggregate unpaid invoices for. Format: URL-safe encoded string.","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Aggregate unpaid totals for the team.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnpaidTotalsResource_Read"},"examples":{"UnpaidTotals":{"description":"UnpaidTotals","value":{"count":42,"totalAmount":12345.67}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/UnpaidTotalsResource_Read"},"examples":{"UnpaidTotals":{"description":"UnpaidTotals","value":{"count":42,"totalAmount":12345.67}}}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - user is not authorized to view the team","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict - Resource conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/billing/workspaces":{"get":{"tags":["Billing Analytics"],"summary":"List Workspace Metrics","description":"\n            Retrieves workspace metrics grouped by Revenium name for the authenticated user's organization.\n\n            Returns paginated workspace-level costs with aggregated usage metrics.\n            All costs are in USD. Token counts include all token types (input, output, cache).\n        ","operationId":"list_workspace_metrics","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Time period for analytics","required":true,"schema":{"type":"string","description":"Time period for analytics","enum":["24h","7d","30d","90d","custom"],"example":"30d"},"example":"30d"},{"name":"startDate","in":"query","description":"Filter start date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter start date/time in ISO 8601 format.","example":"2025-09-01T00:00:00Z"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"Filter end date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter end date/time in ISO 8601 format.","example":"2025-09-01T00:00:00Z"},"example":"2025-09-01T00:00:00Z"},{"name":"provider","in":"query","description":"Filter results by AI provider. Omit to include all providers.","required":false,"schema":{"type":"string","description":"Filter results by AI provider. Omit to include all providers.","enum":["anthropic","openai"],"example":"anthropic"},"example":"anthropic"},{"name":"usageType","in":"query","description":"Filter by usage type. Omit to include all types.","required":false,"schema":{"type":"string","description":"Filter by usage type. Omit to include all types.","enum":["completion","image","embedding","audio","video"],"example":"completion"},"example":"completion"},{"name":"minCost","in":"query","description":"Filter by a starting cost (inclusive).","required":false,"schema":{"type":"number","description":"Filter by a starting cost (inclusive).","example":1,"minimum":0},"example":1},{"name":"maxCost","in":"query","description":"Filter by an ending cost (inclusive).","required":false,"schema":{"type":"number","description":"Filter by an ending cost (inclusive).","example":20,"minimum":0},"example":20},{"name":"query","in":"query","description":"Search query to filter workspaces by name","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["totalCost,DESC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Workspace metrics retrieved successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsPagedModel_Read"}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Organization or credential not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Validation failed - invalid filter parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/billing/users":{"get":{"tags":["User Cost Attribution"],"summary":"List per-user attributed costs","description":"Returns per-user cost attribution based on proportional token distribution of actual provider billing data.","operationId":"listUserCostAttribution","parameters":[{"name":"startDate","in":"query","description":"Inclusive start date of the reporting window (ISO yyyy-MM-dd)","required":true,"schema":{"type":"string","format":"date"},"example":"2026-03-15"},{"name":"endDate","in":"query","description":"Inclusive end date of the reporting window (ISO yyyy-MM-dd)","required":true,"schema":{"type":"string","format":"date"},"example":"2026-04-14"},{"name":"provider","in":"query","description":"Filter by provider identifier (e.g. anthropic, openai)","required":false,"schema":{"type":"string"},"example":"anthropic"},{"name":"workspaceId","in":"query","description":"Filter by provider workspace identifier","required":false,"schema":{"type":"string"}},{"name":"model","in":"query","description":"Filter by AI model identifier","required":false,"schema":{"type":"string"},"example":"claude-sonnet-4-20250514"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["totalAttributedCost,DESC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Per-user attributed costs returned successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCostSummaryResponse_Read"}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/billing/users/{userEmail}":{"get":{"tags":["User Cost Attribution"],"summary":"Get per-user cost detail breakdown","description":"Returns daily and model-level breakdown of attributed costs for a specific user.","operationId":"getUserCostDetail","parameters":[{"name":"userEmail","in":"path","description":"Email address of the user whose cost breakdown is being requested","required":true,"schema":{"type":"string"},"example":"alice@example.com"},{"name":"startDate","in":"query","description":"Inclusive start date of the reporting window (ISO yyyy-MM-dd)","required":true,"schema":{"type":"string","format":"date"},"example":"2026-03-15"},{"name":"endDate","in":"query","description":"Inclusive end date of the reporting window (ISO yyyy-MM-dd)","required":true,"schema":{"type":"string","format":"date"},"example":"2026-04-14"},{"name":"provider","in":"query","description":"Filter by provider identifier (e.g. anthropic, openai)","required":false,"schema":{"type":"string"},"example":"anthropic"}],"responses":{"200":{"description":"Per-user cost detail returned successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCostDetailResponse_Read"}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"No organization found for the authenticated user","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/billing/users/vcs-prs":{"get":{"tags":["User Cost Attribution"],"summary":"Get VCS PRs/MRs by team member","description":"Returns merged PR/MR counts grouped by platform login for the organization, filtered by VCS source (github or gitlab). With granularity=day, returns one row per (login, calendar day) instead of a single per-login total; days are UTC calendar dates (the underlying metric_date has no time component) and are zero-filled for logins with at least one merged PR in range, so quiet days are returned as 0 rather than omitted. Days older than the trailing ~30-day sync window are frozen at their last sync and may miss late-recorded activity; day-level history exists from the org's first sync onward. granularity=day is capped at 35 days per request; use granularity=window for longer ranges. granularity=week or month returns one row per (login, bucket) instead, zero-filled per bucket rather than per day; weeks are ISO-8601 (Monday start) and months are calendar months, both in UTC. week and month are capped at 400 days per request. prsMergedWithCodingTool counts merges whose commits matched the tenant's configured co-author patterns (Claude Code's by default), so it answers 'AI-assisted' without naming a vendor; the additive prsMergedByVendor / totalPrsMergedByVendor maps name the vendor for every merge that matched a recognized vendor's patterns. The two are NOT nested: a tenant that configures a signature no shipped vendor default covers gets the merge counted in prsMergedWithCodingTool with no vendor identified. Because one PR can be attributed to several vendors their values may sum to more than prsMerged. Vendor keys are CodingAssistantMetricProvider names (e.g. ClaudeCode, not claude-code) and a key is present only with a non-zero count. The maps are omitted from the payload when no vendor was attributed, and unlike prsMerged they are not zero-filled on week or month buckets with no attributed merge.","operationId":"getVcsPrsSummary","parameters":[{"name":"source","in":"query","description":"VCS source: github or gitlab","required":true,"schema":{"type":"string"},"example":"github"},{"name":"startDate","in":"query","description":"Start date (ISO yyyy-MM-dd)","required":true,"schema":{"type":"string","format":"date"},"example":"2026-03-15"},{"name":"endDate","in":"query","description":"End date (ISO yyyy-MM-dd)","required":true,"schema":{"type":"string","format":"date"},"example":"2026-04-14"},{"name":"granularity","in":"query","description":"Aggregation granularity: 'window' (default) returns one row per platform login totalled across the date range; 'day' returns one row per platform login per UTC calendar day (zero-filled for quiet days), capped at 35 days per request; 'week' and 'month' return one row per platform login per bucket (ISO week starting Monday, or calendar month), zero-filled per bucket, capped at 400 days per request. Days older than the trailing ~30-day sync window are frozen at their last sync.","required":false,"schema":{"type":"string","default":"window"},"example":"window"}],"responses":{"200":{"description":"VCS PRs/MRs returned","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VcsPrsSummaryResponse_Read"}}}},"400":{"description":"Invalid parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/billing/users/claude-code-contributions":{"get":{"tags":["User Cost Attribution"],"summary":"Get Claude Code contributions by user","description":"Returns PRs, commits, and lines of code contributed with Claude Code assistance, sourced from Anthropic Analytics API.","operationId":"getClaudeCodeContributions","parameters":[{"name":"startDate","in":"query","description":"Start date (ISO yyyy-MM-dd)","required":true,"schema":{"type":"string","format":"date"},"example":"2026-03-15"},{"name":"endDate","in":"query","description":"End date (ISO yyyy-MM-dd)","required":true,"schema":{"type":"string","format":"date"},"example":"2026-04-14"}],"responses":{"200":{"description":"Claude Code contributions returned successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaudeCodeContributionsSummaryResponse_Read"}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/billing/refresh":{"get":{"tags":["Billing Analytics"],"summary":"Trigger Billing Data Refresh","description":"\n            Triggers a billing data refresh for the specified organization.\n\n            **Refresh Types:**\n            - `intraday` (default): Synchronous — fetches today's data and returns 200 when complete\n            - `historical`: Asynchronous — validates synchronously, dispatches background processing, and returns 202 Accepted immediately. Check system logs (`GET /v2/api/logs/system/internal`) to monitor progress.\n        ","operationId":"trigger_billing_refresh","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"credentialId","in":"query","description":"\n                Unique identifier of the provider credential. Format: Revenium hashid (URL-safe encoded string).\n                **Required when refreshType is 'historical'**.\n            ","required":false,"schema":{"type":"string"},"example":"aB3xYz9"},{"name":"credentialIds","in":"query","description":"\n                List of provider credential identifiers. Format: Revenium hashid (URL-safe encoded string).\n                **Required when refreshType is 'historical'**.\n            ","required":false,"schema":{"type":"array","items":{"type":"string","example":"aB3xYz9"}}},{"name":"refreshType","in":"query","description":"\n                Type of refresh to perform:\n                - `intraday`: Fetches today's data with hourly granularity (up to current hour)\n                - `historical`: Fetches historical daily data for the specified number of days\n            ","required":false,"schema":{"type":"string","default":"intraday","enum":["intraday","historical"]},"example":"intraday"},{"name":"historicalDays","in":"query","description":"Number of days to fetch when refreshType is 'historical'. Only applicable for historical refresh. Must be between 1 and 90.","required":false,"schema":{"type":"integer","default":90,"maximum":90,"minimum":1},"example":90}],"responses":{"200":{"description":"Intraday refresh completed synchronously","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshAcceptedResponse"}}}},"202":{"description":"Historical refresh accepted and processing in background","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshAcceptedResponse"}}}},"400":{"description":"Invalid request parameters, credential does not belong to organization, or credential is not valid","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Organization or credential not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/billing/models":{"get":{"tags":["Billing Analytics"],"summary":"List Model Efficiency Metrics","description":"\n            Retrieves AI model efficiency and cost metrics for the authenticated user's organization.\n\n            Returns paginated model-level metrics\n            All costs are in USD. Token counts include all token types (input, output, cache).\n        ","operationId":"list_models","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Time period for analytics","required":true,"schema":{"type":"string","description":"Time period for analytics","enum":["24h","7d","30d","90d","custom"],"example":"30d"},"example":"30d"},{"name":"startDate","in":"query","description":"Filter start date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter start date/time in ISO 8601 format.","example":"2025-09-01T00:00:00Z"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"Filter end date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter end date/time in ISO 8601 format.","example":"2025-09-01T00:00:00Z"},"example":"2025-09-01T00:00:00Z"},{"name":"provider","in":"query","description":"Filter results by AI provider. Omit to include all providers.","required":false,"schema":{"type":"string","description":"Filter results by AI provider. Omit to include all providers.","enum":["anthropic","openai"],"example":"anthropic"},"example":"anthropic"},{"name":"usageType","in":"query","description":"Filter by usage type. Omit to include all types.","required":false,"schema":{"type":"string","description":"Filter by usage type. Omit to include all types.","enum":["completion","image","embedding","audio","video"],"example":"completion"},"example":"completion"},{"name":"minCost","in":"query","description":"Filter by a starting cost (inclusive).","required":false,"schema":{"type":"number","description":"Filter by a starting cost (inclusive).","example":1,"minimum":0},"example":1},{"name":"maxCost","in":"query","description":"Filter by an ending cost (inclusive).","required":false,"schema":{"type":"number","description":"Filter by an ending cost (inclusive).","example":20,"minimum":0},"example":20},{"name":"query","in":"query","description":"Search query to filter models by name","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["totalCost,DESC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Model efficiency metrics retrieved successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsPagedModel_Read"}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Organization or credential not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Validation failed - invalid filter parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/billing/daily":{"get":{"tags":["Billing Analytics"],"summary":"Get Daily Cost and Credits Breakdown","description":"\n            Retrieves a per-day breakdown of cost and credits applied for the authenticated user's\n            organization, grouped by (date, provider, model).\n\n            Returns a flat list of rows (one per date × provider × model) plus organization-wide\n            envelope totals. Suitable for timeseries charts and burn-down analyses.\n\n            All costs and credits are in USD. `creditsApplied` is null on rows where no credits data\n            is available. The envelope `totalCreditsApplied` is null only when no row in the page\n            has a non-null value.\n        ","operationId":"get_daily_breakdown","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Time period for analytics","required":true,"schema":{"type":"string","description":"Time period for analytics","enum":["24h","7d","30d","90d","custom"],"example":"30d"},"example":"30d"},{"name":"startDate","in":"query","description":"Filter start date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter start date/time in ISO 8601 format.","example":"2025-09-01T00:00:00Z"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"Filter end date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter end date/time in ISO 8601 format.","example":"2025-09-01T00:00:00Z"},"example":"2025-09-01T00:00:00Z"},{"name":"provider","in":"query","description":"Filter results by AI provider. Omit to include all providers.","required":false,"schema":{"type":"string","description":"Filter results by AI provider. Omit to include all providers.","enum":["anthropic","openai"],"example":"anthropic"},"example":"anthropic"},{"name":"usageType","in":"query","description":"Filter by usage type. Omit to include all types.","required":false,"schema":{"type":"string","description":"Filter by usage type. Omit to include all types.","enum":["completion","image","embedding","audio","video"],"example":"completion"},"example":"completion"},{"name":"minCost","in":"query","description":"Filter by a starting cost (inclusive).","required":false,"schema":{"type":"number","description":"Filter by a starting cost (inclusive).","example":1,"minimum":0},"example":1},{"name":"maxCost","in":"query","description":"Filter by an ending cost (inclusive).","required":false,"schema":{"type":"number","description":"Filter by an ending cost (inclusive).","example":20,"minimum":0},"example":20}],"responses":{"200":{"description":"Daily breakdown retrieved successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsPagedModel_Read"}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Organization or credential not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Validation failed - invalid filter parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/billing/coverage":{"get":{"tags":["Billing Analytics"],"summary":"Get Provider Coverage Ratio","description":"Returns aggregate coverage ratio (metered OTLP cost ÷ provider billing cost) and per-provider breakdown. Requires coding-assistant-separation-active feature flag.","operationId":"get_coverage_ratio","parameters":[{"name":"period","in":"query","description":"Time period for analytics","required":true,"schema":{"type":"string","description":"Time period for analytics","enum":["24h","7d","30d","90d","custom"],"example":"30d"},"example":"30d"},{"name":"startDate","in":"query","description":"Filter start date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter start date/time in ISO 8601 format.","example":"2025-09-01T00:00:00Z"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"Filter end date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter end date/time in ISO 8601 format.","example":"2025-09-01T00:00:00Z"},"example":"2025-09-01T00:00:00Z"},{"name":"provider","in":"query","description":"Filter results by AI provider. Omit to include all providers.","required":false,"schema":{"type":"string","description":"Filter results by AI provider. Omit to include all providers.","enum":["anthropic","openai"],"example":"anthropic"},"example":"anthropic"},{"name":"usageType","in":"query","description":"Filter by usage type. Omit to include all types.","required":false,"schema":{"type":"string","description":"Filter by usage type. Omit to include all types.","enum":["completion","image","embedding","audio","video"],"example":"completion"},"example":"completion"},{"name":"minCost","in":"query","description":"Filter by a starting cost (inclusive).","required":false,"schema":{"type":"number","description":"Filter by a starting cost (inclusive).","example":1,"minimum":0},"example":1},{"name":"maxCost","in":"query","description":"Filter by an ending cost (inclusive).","required":false,"schema":{"type":"number","description":"Filter by an ending cost (inclusive).","example":20,"minimum":0},"example":20},{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Coverage ratio retrieved successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoverageRatioResponse_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/CoverageRatioResponse_Read"}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/billing/chart":{"get":{"tags":["Provider Charts"],"summary":"Provider billing chart","description":"\n            Returns provider billing data shaped as chart series for the selected metric, dimension and mode.\n\n            metric: totalCost | requestCount | tokenCount | inputTokens | outputTokens\n            dimension: none | provider | model | workspace | apiKey | usageType\n            mode: time (one series per dimension value over date buckets) | aggregate (one series, one point per dimension value)\n            grain: day | week | month (time mode only)\n        ","operationId":"get_provider_chart","parameters":[{"name":"period","in":"query","description":"Time period for analytics","required":true,"schema":{"type":"string","description":"Time period for analytics","enum":["24h","7d","30d","90d","custom"],"example":"30d"},"example":"30d"},{"name":"startDate","in":"query","description":"Filter start date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter start date/time in ISO 8601 format.","example":"2025-09-01T00:00:00Z"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"Filter end date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter end date/time in ISO 8601 format.","example":"2025-09-01T00:00:00Z"},"example":"2025-09-01T00:00:00Z"},{"name":"provider","in":"query","description":"Filter results by AI provider. Omit to include all providers.","required":false,"schema":{"type":"string","description":"Filter results by AI provider. Omit to include all providers.","enum":["anthropic","openai"],"example":"anthropic"},"example":"anthropic"},{"name":"usageType","in":"query","description":"Filter by usage type. Omit to include all types.","required":false,"schema":{"type":"string","description":"Filter by usage type. Omit to include all types.","enum":["completion","image","embedding","audio","video"],"example":"completion"},"example":"completion"},{"name":"minCost","in":"query","description":"Filter by a starting cost (inclusive).","required":false,"schema":{"type":"number","description":"Filter by a starting cost (inclusive).","example":1,"minimum":0},"example":1},{"name":"maxCost","in":"query","description":"Filter by an ending cost (inclusive).","required":false,"schema":{"type":"number","description":"Filter by an ending cost (inclusive).","example":20,"minimum":0},"example":20},{"name":"metric","in":"query","required":false,"schema":{"type":"string","default":"totalCost"}},{"name":"dimension","in":"query","required":false,"schema":{"type":"string","default":"none"}},{"name":"mode","in":"query","required":false,"schema":{"type":"string","default":"time"}},{"name":"grain","in":"query","required":false,"schema":{"type":"string","default":"day"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderChartResource"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/ProviderChartResource"}}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"oneOf":[{"type":"object","additionalProperties":{}},{"$ref":"#/components/schemas/ApiError"}]}}}},"404":{"description":"Not Found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/billing/api-keys":{"get":{"tags":["Billing Analytics"],"summary":"List API Key Analytics","description":"\n            Retrieves API key analytics data grouped by API key for the authenticated user's organization.\n\n            Returns paginated API key-level costs with detailed usage metrics\n            All costs are in USD. Token counts include all token types (input, output, cache).\n        ","operationId":"list_api_keys","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization). Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"period","in":"query","description":"Time period for analytics","required":true,"schema":{"type":"string","description":"Time period for analytics","enum":["24h","7d","30d","90d","custom"],"example":"30d"},"example":"30d"},{"name":"startDate","in":"query","description":"Filter start date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter start date/time in ISO 8601 format.","example":"2025-09-01T00:00:00Z"},"example":"2025-09-01T00:00:00Z"},{"name":"endDate","in":"query","description":"Filter end date/time in ISO 8601 format.","required":false,"schema":{"type":"string","description":"Filter end date/time in ISO 8601 format.","example":"2025-09-01T00:00:00Z"},"example":"2025-09-01T00:00:00Z"},{"name":"provider","in":"query","description":"Filter results by AI provider. Omit to include all providers.","required":false,"schema":{"type":"string","description":"Filter results by AI provider. Omit to include all providers.","enum":["anthropic","openai"],"example":"anthropic"},"example":"anthropic"},{"name":"usageType","in":"query","description":"Filter by usage type. Omit to include all types.","required":false,"schema":{"type":"string","description":"Filter by usage type. Omit to include all types.","enum":["completion","image","embedding","audio","video"],"example":"completion"},"example":"completion"},{"name":"minCost","in":"query","description":"Filter by a starting cost (inclusive).","required":false,"schema":{"type":"number","description":"Filter by a starting cost (inclusive).","example":1,"minimum":0},"example":1},{"name":"maxCost","in":"query","description":"Filter by an ending cost (inclusive).","required":false,"schema":{"type":"number","description":"Filter by an ending cost (inclusive).","example":20,"minimum":0},"example":20},{"name":"query","in":"query","description":"Search query to filter API keys by name","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["totalCost,DESC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"API key analytics data retrieved successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsPagedModel_Read"}}}},"400":{"description":"Invalid request parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Organization or credential not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Validation failed - invalid filter parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/ai/enforcement-rules/{teamId}":{"get":{"tags":["Enforcement Rules"],"summary":"Get compiled enforcement rules for a team","description":"Retrieve the latest compiled enforcement rules from Redis for the specified team.","operationId":"get_enforcement_rules","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Compiled enforcement rules retrieved successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnforcementRulesPayload"}}}},"204":{"description":"No compiled rules available for the specified team","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnforcementRulesPayload"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/EnforcementRulesPayload"}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/ai/enforcement-events":{"get":{"tags":["Enforcement Events"],"summary":"List recent enforcement events for a team","description":"Returns the most recent enforcement violation events for the team. Includes both shadow-mode evaluations (would-block) and real enforcement actions. Structured fields (ruleName, action, metricType, currentValue, threshold, usagePercent, tenantId) are parsed server-side from the audit-trail `details` string; `rawDetails` is preserved as an escape hatch.","operationId":"list_enforcement_events","parameters":[{"name":"teamId","in":"query","description":"Revenium-generated identifier of the team to scope the list","required":true,"schema":{"type":"string"},"example":"a91XJp"},{"name":"since","in":"query","description":"Optional ISO-8601 timestamp. Only events at or after this instant are returned.","required":false,"schema":{"type":"string"},"example":"2026-04-21T00:00:00Z"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"ruleId","in":"query","description":"Optional Revenium-generated identifier of a cost control. When supplied, only events produced by that rule are returned.","schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"200":{"description":"Page of enforcement events","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedModel_Read"}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModel_Read"}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid `since` parameter format","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/ai/alerts/{anomalyId}/budget/progress":{"get":{"tags":["AI Anomaly Progress"],"summary":"Get Budget Progress for AI Anomaly","description":"Retrieve budget progress tracking for a CUMULATIVE_USAGE anomaly. Returns current value, remaining budget, percent used, and ahead/behind vs linear expectation.","operationId":"get_budget_progress","parameters":[{"name":"anomalyId","in":"path","description":"Unique identifier of the AI anomaly","required":true,"schema":{"type":"string"},"example":"jR2kmLs"},{"name":"now","in":"query","description":"Optional ISO-8601 timestamp for progress calculation. Defaults to current time if not provided.","required":false,"schema":{"type":"string"},"example":"2025-10-15T14:30:00Z"},{"name":"includeTrend","in":"query","description":"Include trend data. Accepted but currently ignored.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Budget progress retrieved successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BudgetProgressResource"},{"$ref":"#/components/schemas/GroupedBudgetProgressResource"}]}},"application/hal+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BudgetProgressResource"},{"$ref":"#/components/schemas/GroupedBudgetProgressResource"}]}}}},"400":{"description":"Invalid anomaly type or missing period type","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Anomaly not found or not accessible to caller's organization","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid 'now' parameter format (semantic validation error)","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/ai/alerts/budgets/progress":{"get":{"tags":["AI Anomaly Progress"],"summary":"Get Bulk Budget Progress for Multiple AI Anomalies","description":"Retrieve budget progress tracking for multiple CUMULATIVE_USAGE anomalies in a single request. Returns per-item success or error results, preserving input order. Supports up to 50 anomaly IDs. Duplicate IDs are allowed and produce corresponding duplicate results.","operationId":"get_budget_progress_bulk","parameters":[{"name":"ids","in":"query","description":"Comma-separated list of AI anomaly identifiers (max 50)","required":true,"schema":{"type":"string"},"example":"jR2kmLs,mN3xpQz,pQr7sTu"},{"name":"now","in":"query","description":"Optional ISO-8601 timestamp for progress calculation. Applies to all items in the bulk request. Defaults to current time if not provided.","required":false,"schema":{"type":"string"},"example":"2025-10-15T14:30:00Z"},{"name":"includeTrend","in":"query","description":"Include trend data. Accepted but currently ignored.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Bulk budget progress retrieved successfully (includes per-item success/error)","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkBudgetProgressResponse"},"examples":{"All Success (Ungrouped)":{"summary":"Two successful ungrouped budget progress items","description":"All Success (Ungrouped)","value":{"items":[{"ok":true,"alertId":"jR2kmLs","metricType":"TOTAL_COST","cumulativePeriod":"MONTHLY","threshold":1000,"currentValue":750.5,"remaining":249.5,"percentUsed":0.7505,"window":{"start":"2025-10-01T00:00:00Z","now":"2025-10-15T14:30:00Z","endExpected":"2025-10-31T23:59:59.999999999Z"},"aheadBehindVsLinear":{"expectedByNow":483.87,"delta":266.63,"status":"AHEAD"}},{"ok":true,"alertId":"mN3xpQz","metricType":"TOKEN_COUNT","cumulativePeriod":"WEEKLY","threshold":1000000,"currentValue":250000,"remaining":750000,"percentUsed":0.25,"window":{"start":"2025-10-13T00:00:00Z","now":"2025-10-15T14:30:00Z","endExpected":"2025-10-19T23:59:59.999999999Z"},"aheadBehindVsLinear":{"expectedByNow":357142.86,"delta":-107142.86,"status":"BEHIND"}}]}},"Mixed Success and Error":{"summary":"One success, one not found, one unsupported type","description":"Mixed Success and Error","value":{"items":[{"ok":true,"alertId":"jR2kmLs","metricType":"TOTAL_COST","cumulativePeriod":"MONTHLY","threshold":1000,"currentValue":750.5,"remaining":249.5,"percentUsed":0.7505,"window":{"start":"2025-10-01T00:00:00Z","now":"2025-10-15T14:30:00Z","endExpected":"2025-10-31T23:59:59.999999999Z"},"aheadBehindVsLinear":{"expectedByNow":483.87,"delta":266.63,"status":"AHEAD"}},{"ok":false,"id":"xyz123","error":{"code":"NOT_FOUND","type":"NOT_FOUND","message":"AI Anomaly with id xyz123 not found"}},{"ok":false,"id":"abc456","error":{"code":"UNSUPPORTED_TYPE","type":"UNSUPPORTED_TYPE","message":"Anomaly with id abc456 is not a CUMULATIVE_USAGE type anomaly"}}]}},"Grouped Budget with Groups":{"summary":"Successful grouped budget with per-group breakdown","description":"Grouped Budget with Groups","value":{"items":[{"ok":true,"alertId":"pQr7sTu","metricType":"TOTAL_COST","cumulativePeriod":"MONTHLY","threshold":500,"currentValue":0,"remaining":0,"window":{"start":"2025-10-01T00:00:00Z","now":"2025-10-15T14:30:00Z","endExpected":"2025-10-31T23:59:59.999999999Z"},"aheadBehindVsLinear":{"expectedByNow":241.94,"delta":-241.94,"status":"BEHIND"},"groups":[{"groupValue":"gpt-4","groupDisplayName":"GPT-4","currentValue":150,"remaining":350,"percentUsed":0.3},{"groupValue":"claude-3","groupDisplayName":"Claude 3","currentValue":100,"remaining":400,"percentUsed":0.2}]}]}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/BulkBudgetProgressResponse"},"examples":{"All Success (Ungrouped)":{"summary":"Two successful ungrouped budget progress items","description":"All Success (Ungrouped)","value":{"items":[{"ok":true,"alertId":"jR2kmLs","metricType":"TOTAL_COST","cumulativePeriod":"MONTHLY","threshold":1000,"currentValue":750.5,"remaining":249.5,"percentUsed":0.7505,"window":{"start":"2025-10-01T00:00:00Z","now":"2025-10-15T14:30:00Z","endExpected":"2025-10-31T23:59:59.999999999Z"},"aheadBehindVsLinear":{"expectedByNow":483.87,"delta":266.63,"status":"AHEAD"}},{"ok":true,"alertId":"mN3xpQz","metricType":"TOKEN_COUNT","cumulativePeriod":"WEEKLY","threshold":1000000,"currentValue":250000,"remaining":750000,"percentUsed":0.25,"window":{"start":"2025-10-13T00:00:00Z","now":"2025-10-15T14:30:00Z","endExpected":"2025-10-19T23:59:59.999999999Z"},"aheadBehindVsLinear":{"expectedByNow":357142.86,"delta":-107142.86,"status":"BEHIND"}}]}},"Mixed Success and Error":{"summary":"One success, one not found, one unsupported type","description":"Mixed Success and Error","value":{"items":[{"ok":true,"alertId":"jR2kmLs","metricType":"TOTAL_COST","cumulativePeriod":"MONTHLY","threshold":1000,"currentValue":750.5,"remaining":249.5,"percentUsed":0.7505,"window":{"start":"2025-10-01T00:00:00Z","now":"2025-10-15T14:30:00Z","endExpected":"2025-10-31T23:59:59.999999999Z"},"aheadBehindVsLinear":{"expectedByNow":483.87,"delta":266.63,"status":"AHEAD"}},{"ok":false,"id":"xyz123","error":{"code":"NOT_FOUND","type":"NOT_FOUND","message":"AI Anomaly with id xyz123 not found"}},{"ok":false,"id":"abc456","error":{"code":"UNSUPPORTED_TYPE","type":"UNSUPPORTED_TYPE","message":"Anomaly with id abc456 is not a CUMULATIVE_USAGE type anomaly"}}]}},"Grouped Budget with Groups":{"summary":"Successful grouped budget with per-group breakdown","description":"Grouped Budget with Groups","value":{"items":[{"ok":true,"alertId":"pQr7sTu","metricType":"TOTAL_COST","cumulativePeriod":"MONTHLY","threshold":500,"currentValue":0,"remaining":0,"window":{"start":"2025-10-01T00:00:00Z","now":"2025-10-15T14:30:00Z","endExpected":"2025-10-31T23:59:59.999999999Z"},"aheadBehindVsLinear":{"expectedByNow":241.94,"delta":-241.94,"status":"BEHIND"},"groups":[{"groupValue":"gpt-4","groupDisplayName":"GPT-4","currentValue":150,"remaining":350,"percentUsed":0.3},{"groupValue":"claude-3","groupDisplayName":"Claude 3","currentValue":100,"remaining":400,"percentUsed":0.2}]}]}}}}}},"400":{"description":"Validation error (empty ids, >50 ids, missing ids parameter)","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid 'now' parameter format (semantic validation error)","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/ai/alerts/budgets/portfolio":{"get":{"tags":["AI Anomaly Progress"],"summary":"Get Budget Portfolio for Tenant","description":"Retrieve a paginated portfolio view of all budget alerts for the authenticated tenant. Returns current progress, risk assessment, and window boundaries for each budget. Supports sorting by risk level or percent used.","operationId":"get_budget_portfolio","parameters":[{"name":"now","in":"query","description":"Optional ISO-8601 timestamp for progress calculation. Applies to all items. Defaults to current time if not provided.","required":false,"schema":{"type":"string"},"example":"2025-11-07T14:30:00Z"},{"name":"includeTrend","in":"query","description":"Include trend data. Accepted but currently ignored.","required":false,"schema":{"type":"boolean"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Portfolio retrieved successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedModel"},"examples":{"Portfolio with Mixed Risk Levels":{"summary":"Portfolio showing budgets at different risk levels","description":"Portfolio with Mixed Risk Levels","value":{"_embedded":{"budgetPortfolioItemResources":[{"alertId":"jR2kmLs","name":"Monthly OpenAI Budget","metricType":"TOTAL_COST","cumulativePeriod":"MONTHLY","threshold":1000,"currentValue":950,"remaining":50,"percentUsed":0.95,"risk":"HIGH","window":{"start":"2025-11-01T00:00:00Z","now":"2025-11-07T14:30:00Z","endExpected":"2025-11-30T23:59:59.999999999Z"}},{"alertId":"mN3xpQz","name":"Weekly Token Budget","metricType":"TOKEN_COUNT","cumulativePeriod":"WEEKLY","threshold":1000000,"currentValue":500000,"remaining":500000,"percentUsed":0.5,"risk":"LOW","window":{"start":"2025-11-04T00:00:00Z","now":"2025-11-07T14:30:00Z","endExpected":"2025-11-10T23:59:59.999999999Z"}}]},"page":{"size":20,"totalElements":2,"totalPages":1,"number":0}}},"Grouped Budget in Portfolio":{"summary":"Portfolio item with per-group breakdown","description":"Grouped Budget in Portfolio","value":{"_embedded":{"budgetPortfolioItemResources":[{"alertId":"pQr7sTu","name":"Multi-Model Budget","metricType":"TOTAL_COST","cumulativePeriod":"MONTHLY","threshold":500,"currentValue":460,"remaining":40,"percentUsed":0.92,"risk":"HIGH","window":{"start":"2025-11-01T00:00:00Z","now":"2025-11-07T14:30:00Z","endExpected":"2025-11-30T23:59:59.999999999Z"},"groups":[{"groupValue":"gpt-4","groupDisplayName":"GPT-4","currentValue":300,"remaining":200,"percentUsed":0.6},{"groupValue":"claude-3","groupDisplayName":"Claude 3","currentValue":160,"remaining":340,"percentUsed":0.32}]}]},"page":{"size":20,"totalElements":1,"totalPages":1,"number":0}}}}},"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModel"},"examples":{"Portfolio with Mixed Risk Levels":{"summary":"Portfolio showing budgets at different risk levels","description":"Portfolio with Mixed Risk Levels","value":{"_embedded":{"budgetPortfolioItemResources":[{"alertId":"jR2kmLs","name":"Monthly OpenAI Budget","metricType":"TOTAL_COST","cumulativePeriod":"MONTHLY","threshold":1000,"currentValue":950,"remaining":50,"percentUsed":0.95,"risk":"HIGH","window":{"start":"2025-11-01T00:00:00Z","now":"2025-11-07T14:30:00Z","endExpected":"2025-11-30T23:59:59.999999999Z"}},{"alertId":"mN3xpQz","name":"Weekly Token Budget","metricType":"TOKEN_COUNT","cumulativePeriod":"WEEKLY","threshold":1000000,"currentValue":500000,"remaining":500000,"percentUsed":0.5,"risk":"LOW","window":{"start":"2025-11-04T00:00:00Z","now":"2025-11-07T14:30:00Z","endExpected":"2025-11-10T23:59:59.999999999Z"}}]},"page":{"size":20,"totalElements":2,"totalPages":1,"number":0}}},"Grouped Budget in Portfolio":{"summary":"Portfolio item with per-group breakdown","description":"Grouped Budget in Portfolio","value":{"_embedded":{"budgetPortfolioItemResources":[{"alertId":"pQr7sTu","name":"Multi-Model Budget","metricType":"TOTAL_COST","cumulativePeriod":"MONTHLY","threshold":500,"currentValue":460,"remaining":40,"percentUsed":0.92,"risk":"HIGH","window":{"start":"2025-11-01T00:00:00Z","now":"2025-11-07T14:30:00Z","endExpected":"2025-11-30T23:59:59.999999999Z"},"groups":[{"groupValue":"gpt-4","groupDisplayName":"GPT-4","currentValue":300,"remaining":200,"percentUsed":0.6},{"groupValue":"claude-3","groupDisplayName":"Claude 3","currentValue":160,"remaining":340,"percentUsed":0.32}]}]},"page":{"size":20,"totalElements":1,"totalPages":1,"number":0}}}}}}},"400":{"description":"Invalid request parameters (size > 100)","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Invalid 'now' parameter format (semantic validation error)","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/agents/discovered":{"get":{"tags":["Agents"],"summary":"List discovered agents","description":"List distinct agent values observed in telemetry for the team over the requested period, with activity summary and registration status. Case and surrounding-whitespace variants of the same value are grouped together. Discovery never registers agents — use the create endpoint to register an observed value","operationId":"list_discovered_agents","parameters":[{"name":"teamId","in":"query","description":"Team identifier","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","description":"Observation window, e.g. TWENTY_FOUR_HOURS, SEVEN_DAYS, THIRTY_DAYS","required":true,"schema":{"type":"string","enum":["HOUR","EIGHT_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","NINETY_DAYS","SIX_MONTHS","TWELVE_MONTHS"]},"example":"THIRTY_DAYS"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Collection of discovered agents","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoveredAgentPagedModel_Read"},"examples":{"Discovered Agents List":{"description":"Discovered Agents List","value":{"_embedded":{"discoveredAgentResourceList":[{"telemetryKey":"claude-code","metricCount":1342,"totalCost":123.45,"firstSeen":"2026-06-11T08:12:42.821Z","lastSeen":"2026-07-09T19:04:15.811Z","registered":true,"agentId":"d5jKBD","displayName":"Claude Code","source":"API","ownerId":"XPozX1E"},{"telemetryKey":"marketing-agent","metricCount":87,"totalCost":4.56,"firstSeen":"2026-07-02T10:00:00.000Z","lastSeen":"2026-07-09T12:30:00.000Z","registered":false}]},"page":{"size":20,"totalElements":2,"totalPages":1,"number":0}}}}}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"404":{"description":"Team not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError_Read"}}}}}}},"/v2/api/sources/ai/anomaly/clear":{"delete":{"tags":["AI Anomaly"],"summary":"Clear all AI Anomalies","description":"Clears all AI anomalies.","operationId":"clear_all_ai_anomalies","parameters":[{"name":"teamId","in":"query","description":"Unique identifier of the team (organization) whose anomalies to clear. Format: Revenium hashid (URL-safe encoded string).","required":true,"schema":{"type":"string"},"example":"jR2kmLs"}],"responses":{"204":{"description":"All AI anomalies cleared successfully","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}}},"400":{"description":"Invalid request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized - Authentication required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden - Insufficient permissions","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable entity - Validation failed","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/integrations/gitlab/mappings/{id}":{"delete":{"tags":["Gitlab User Mapping"],"summary":"Delete a GitLab mapping","description":"Removes the mapping. Auto-resolution will retry on next sync.","operationId":"deleteGitlabUserMapping","parameters":[{"name":"id","in":"path","description":"Mapping identifier","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"description":"Mapping deleted","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}}},"400":{"description":"Bad request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Mapping not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/integrations/github/mappings/{id}":{"delete":{"tags":["Github User Mapping"],"summary":"Delete a Github mapping","description":"Removes the mapping. Auto-resolution will retry on next sync.","operationId":"deleteGithubUserMapping","parameters":[{"name":"id","in":"path","description":"Mapping identifier","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"description":"Mapping deleted","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}}},"400":{"description":"Bad request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Mapping not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/integrations/directory/mappings/{id}":{"delete":{"tags":["Directory Mappings"],"summary":"Delete a directory mapping","description":"Removes the mapping. Auto-resolution will retry on next sync.","operationId":"deleteDirectoryLinkMapping","parameters":[{"name":"teamId","in":"query","description":"Team (organization) identifier the mapping belongs to","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Mapping identifier","required":true,"schema":{"type":"integer","format":"int64"},"example":42}],"responses":{"204":{"description":"Mapping deleted","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Mapping not found in current organization","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v2/api/integration-credentials/{id}":{"delete":{"tags":["Integration Credentials"],"summary":"Delete an integration credential","description":"Soft-deletes the credential. Subsequent reads will not return it.","operationId":"deleteIntegrationCredential","parameters":[{"name":"id","in":"path","description":"Credential identifier","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"description":"Credential deleted","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}}},"400":{"description":"Bad Request","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Credential not found in current organization","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Conflict","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Unprocessable Content","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}},"components":{"schemas":{"ApiError":{"type":"object","description":"Error response from the API","properties":{"timestamp":{"type":"string","description":"The time the error occurred in ISO format","example":"2025-05-28T14:30:00Z"},"status":{"type":"integer","format":"int32","description":"The HTTP status code","example":400},"error":{"type":"string","description":"The HTTP status reason phrase","example":"Bad Request"},"message":{"type":["string","null"],"description":"The error message","example":"Validation failed for one or more fields"},"path":{"type":"string","description":"The request URI","example":"/api/v2/resource"},"details":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional error details","example":{"field":"error message"}},"errors":{"type":["array","null"],"description":"Structured per-error entries for response shapes that need machine-readable error codes (e.g. strict ingestion mode 422 responses). Omitted from existing handlers for backward compatibility.","items":{"$ref":"#/components/schemas/StructuredError"}},"docsUrl":{"type":["string","null"],"description":"Link to documentation explaining the error and remediation steps.","example":"https://docs.revenium.io/ai/customer-and-subscriber-management/strict-ingestion-mode"}}},"StructuredError":{"type":"object","description":"Structured per-error entry with a stable code, optional single-field reference, and remediation guidance","properties":{"code":{"type":"string","description":"Stable error code. Strict ingestion responses use values from `StrictIngestionErrorCode`; future error vocabularies (other 422s) may emit their own stable strings here.","example":"PRODUCT_NOT_FOUND"},"field":{"type":["string","null"],"description":"The single input field this error refers to","example":"productId"},"value":{"type":["string","null"],"description":"The offending value, if applicable","example":"prd_xyz"},"message":{"type":"string","description":"Human-readable description of the error"},"resolution":{"type":"string","description":"Suggested remediation the caller can apply"}}},"ResourceMetadata_Write":{"description":"Metadata of a resource"},"TeamMetadata_Write":{"description":"Metadata of a team resource with logo"},"UserResource_Write":{"type":"object","description":"user","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"user","readOnly":true},"label":{"type":"string","description":"The user's label (automatically set to the email address for display purposes)","example":"ash@weyland-yutani.io","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"email":{"type":"string","description":"The email address of the user","example":"ash@weyland-yutani.io"},"firstName":{"type":["string","null"],"description":"The first name of the user","example":"Ash"},"lastName":{"type":["string","null"],"description":"The last name of the user","example":"Williams"},"phoneNumber":{"type":["string","null"],"description":"The phone number associated with the user","example":"001-718-555-5555"},"homepagePreference":{"type":["string","null"],"description":"The user's homepage preference","enum":["PRODUCTS","CUSTOMERS","INVOICES","REVENUE_DASHBOARD","PRODUCT_ANALYTICS","HISTORICAL_USAGE","API_ANALYTICS","ANALYTICS_LOGS","PRODUCT_LOGS","SYSTEM_LOGS","SUBSCRIPTIONS"],"example":"PRODUCTS"},"persona":{"type":["string","null"],"description":"The user's role-based UI persona (cxo_finance, product_leaders or platform_engineering)","enum":["cxo_finance","product_leaders","platform_engineering"],"example":"cxo_finance"},"roles":{"type":"array","description":"The roles of the user","example":["ROLE_API_CONSUMER"],"items":{"type":"string"}},"tenant":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Write"},{"type":"null"}]},"tenantId":{"type":["string","null"],"description":"The ID of the tenant","example":"pEjxgX","readOnly":true},"teams":{"type":["array","null"],"description":"The teams the user belongs to","items":{"$ref":"#/components/schemas/TeamMetadata_Write"},"readOnly":true},"teamIds":{"type":"array","description":"The IDs of the teams the user belongs to","example":["a91XJp"],"items":{"type":"string"},"writeOnly":true},"defaultTeamId":{"type":["string","null"],"description":"The ID of the default team/organization to load on login","example":"a91XJp"},"primaryUser":{"type":["boolean","null"],"description":"is this the primaryUser in the tenant","example":false},"subscriberId":{"type":["string","null"],"description":"The ID of the subscriber","example":"pEjxgX","readOnly":true},"redirectUrl":{"type":["string","null"],"description":"The URL to use for the magic link invitation email. If not provided, uses the platform default URL.","example":"http://localhost:8081","writeOnly":true},"scheduledForDeletionAt":{"type":["string","null"],"description":"The date when the account is scheduled for permanent deletion (ISO 8601 format). Null if not scheduled for deletion.","example":"2025-01-23T00:00:00Z","readOnly":true},"canViewPromptData":{"type":["boolean","null"],"description":"Whether the user can view captured prompt data (system prompts, messages, and responses). This flag only affects non-admin users; Tenant Administrators have implicit access regardless of this setting. Only modifiable by Tenant Administrators.","example":false},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["email","roles"]},"ResourceMetadata_Read":{"type":"object","description":"Metadata of a resource","properties":{"id":{"type":"string","description":"The id of the resource","example":"JMwX9g4","readOnly":true},"resourceType":{"type":"string","description":"The type of object","readOnly":true},"label":{"type":"string","description":"The object's label","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}}},"TeamMetadata_Read":{"type":"object","description":"Metadata of a team resource with logo","properties":{"id":{"type":"string","description":"The id of the team","example":"JMwX9g4","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"team","readOnly":true},"label":{"type":"string","description":"The team's name","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"logo":{"type":["string","null"],"description":"The team's logo URL","example":"https://cdn.revenium.io/logos/team-logo.png","readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}}},"UserResource_Read":{"type":"object","description":"user","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"user","readOnly":true},"label":{"type":"string","description":"The user's label (automatically set to the email address for display purposes)","example":"ash@weyland-yutani.io","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"email":{"type":"string","description":"The email address of the user","example":"ash@weyland-yutani.io"},"firstName":{"type":["string","null"],"description":"The first name of the user","example":"Ash"},"lastName":{"type":["string","null"],"description":"The last name of the user","example":"Williams"},"phoneNumber":{"type":["string","null"],"description":"The phone number associated with the user","example":"001-718-555-5555"},"homepagePreference":{"type":["string","null"],"description":"The user's homepage preference","enum":["PRODUCTS","CUSTOMERS","INVOICES","REVENUE_DASHBOARD","PRODUCT_ANALYTICS","HISTORICAL_USAGE","API_ANALYTICS","ANALYTICS_LOGS","PRODUCT_LOGS","SYSTEM_LOGS","SUBSCRIPTIONS"],"example":"PRODUCTS"},"persona":{"type":["string","null"],"description":"The user's role-based UI persona (cxo_finance, product_leaders or platform_engineering)","enum":["cxo_finance","product_leaders","platform_engineering"],"example":"cxo_finance"},"roles":{"type":"array","description":"The roles of the user","example":["ROLE_API_CONSUMER"],"items":{"type":"string"}},"tenant":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"tenantId":{"type":["string","null"],"description":"The ID of the tenant","example":"pEjxgX","readOnly":true},"teams":{"type":["array","null"],"description":"The teams the user belongs to","items":{"$ref":"#/components/schemas/TeamMetadata_Read"},"readOnly":true},"teamIds":{"type":"array","description":"The IDs of the teams the user belongs to","example":["a91XJp"],"items":{"type":"string"},"writeOnly":true},"defaultTeamId":{"type":["string","null"],"description":"The ID of the default team/organization to load on login","example":"a91XJp"},"primaryUser":{"type":["boolean","null"],"description":"is this the primaryUser in the tenant","example":false},"subscriberId":{"type":["string","null"],"description":"The ID of the subscriber","example":"pEjxgX","readOnly":true},"redirectUrl":{"type":["string","null"],"description":"The URL to use for the magic link invitation email. If not provided, uses the platform default URL.","example":"http://localhost:8081","writeOnly":true},"scheduledForDeletionAt":{"type":["string","null"],"description":"The date when the account is scheduled for permanent deletion (ISO 8601 format). Null if not scheduled for deletion.","example":"2025-01-23T00:00:00Z","readOnly":true},"canViewPromptData":{"type":["boolean","null"],"description":"Whether the user can view captured prompt data (system prompts, messages, and responses). This flag only affects non-admin users; Tenant Administrators have implicit access regardless of this setting. Only modifiable by Tenant Administrators.","example":false},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["email","roles"]},"ApiError_Read":{"type":"object","description":"Error response from the API","properties":{"timestamp":{"type":"string","description":"The time the error occurred in ISO format","example":"2025-05-28T14:30:00Z"},"status":{"type":"integer","format":"int32","description":"The HTTP status code","example":400},"error":{"type":"string","description":"The HTTP status reason phrase","example":"Bad Request"},"message":{"type":["string","null"],"description":"The error message","example":"Validation failed for one or more fields"},"path":{"type":"string","description":"The request URI","example":"/api/v2/resource"},"details":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional error details","example":{"field":"error message"}},"errors":{"type":["array","null"],"description":"Structured per-error entries for response shapes that need machine-readable error codes (e.g. strict ingestion mode 422 responses). Omitted from existing handlers for backward compatibility.","items":{"$ref":"#/components/schemas/StructuredError_Read"}},"docsUrl":{"type":["string","null"],"description":"Link to documentation explaining the error and remediation steps.","example":"https://docs.revenium.io/ai/customer-and-subscriber-management/strict-ingestion-mode"}}},"StructuredError_Read":{"type":"object","description":"Structured per-error entry with a stable code, optional single-field reference, and remediation guidance","properties":{"code":{"type":"string","description":"Stable error code. Strict ingestion responses use values from `StrictIngestionErrorCode`; future error vocabularies (other 422s) may emit their own stable strings here.","example":"PRODUCT_NOT_FOUND"},"field":{"type":["string","null"],"description":"The single input field this error refers to","example":"productId"},"value":{"type":["string","null"],"description":"The offending value, if applicable","example":"prd_xyz"},"message":{"type":"string","description":"Human-readable description of the error"},"resolution":{"type":"string","description":"Suggested remediation the caller can apply"}}},"ResourceMetadata":{"type":"object","description":"Metadata of a resource","properties":{"id":{"type":"string","description":"The id of the resource","example":"JMwX9g4","readOnly":true},"resourceType":{"type":"string","description":"The type of object","readOnly":true},"label":{"type":"string","description":"The object's label","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}}},"ToolPricing":{"type":"object","description":"Tool pricing configuration","properties":{"currency":{"type":"string","default":"USD","description":"Currency code","enum":["USD","EUR","CAD","GBP","JPY","CNY","MXN","COP","ARS","ZMW","AUD","ZWG"],"example":"USD"},"elements":{"type":["array","null"],"description":"Metering elements","items":{"$ref":"#/components/schemas/ToolPricingElement"}}}},"ToolPricingElement":{"type":"object","description":"Tool pricing element","properties":{"name":{"type":"string","description":"Element name","example":"requests"},"unitPrice":{"type":["string","null"],"description":"Price per unit","example":"0.10"},"aggregationType":{"type":"string","description":"Aggregation method","enum":["SUM","COUNT","AVERAGE","MAXIMUM","DISTINCT"],"example":"SUM"},"tiers":{"type":["array","null"],"description":"Volume-based pricing tiers","items":{"$ref":"#/components/schemas/ToolPricingTier"}}}},"ToolPricingTier":{"type":"object","description":"Tool pricing tier","properties":{"upTo":{"type":["integer","null"],"format":"int64","description":"Upper bound (null for unlimited)","example":1000},"unitPrice":{"type":"string","description":"Price per unit in tier","example":"0.10"}}},"ToolResource":{"type":"object","description":"A Tool for non-token AI cost metering","properties":{"id":{"type":"string","description":"The unique identifier","example":"a91XJp","readOnly":true},"resourceType":{"type":"string","description":"The type of resource","example":"tool","readOnly":true},"label":{"type":"string","description":"The tool's display label","example":"GitHub MCP Server","readOnly":true},"created":{"type":["string","null"],"description":"Creation timestamp (ISO 8601)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"Last update timestamp (ISO 8601)","example":"2024-09-01T00:00:00Z","readOnly":true},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"Team ID","example":"a91XJp","writeOnly":true},"toolId":{"type":["string","null"],"description":"Unique identifier within organization","example":"mcp-github"},"name":{"type":["string","null"],"description":"Display name","example":"GitHub MCP Server"},"description":{"type":["string","null"],"description":"Detailed description","example":"MCP server for GitHub operations"},"toolType":{"type":["string","null"],"description":"Tool category","enum":["SDK","MCP_SERVER","AI_SERVICE","REST_API","LOCAL_FUNCTION","CUSTOM"],"example":"MCP_SERVER"},"toolProvider":{"type":["string","null"],"description":"Provider/vendor","example":"anthropic"},"configSource":{"type":["string","null"],"description":"Configuration source","enum":["DATABASE","YAML","MERGED"],"example":"DATABASE","readOnly":true},"enabled":{"type":"boolean","default":true,"description":"Whether active for metering","example":true},"plan":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"pricing":{"oneOf":[{"$ref":"#/components/schemas/ToolPricing"},{"type":"null"}]},"_links":{"$ref":"#/components/schemas/Links"}},"required":["name","teamId","toolId","toolType"]},"EntityModelToolResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier","example":"a91XJp","readOnly":true},"resourceType":{"type":"string","description":"The type of resource","example":"tool","readOnly":true},"label":{"type":"string","description":"The tool's display label","example":"GitHub MCP Server","readOnly":true},"created":{"type":["string","null"],"description":"Creation timestamp (ISO 8601)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"Last update timestamp (ISO 8601)","example":"2024-09-01T00:00:00Z","readOnly":true},"team":{"type":"null","oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"Team ID","example":"a91XJp","writeOnly":true},"toolId":{"type":["string","null"],"description":"Unique identifier within organization","example":"mcp-github"},"name":{"type":["string","null"],"description":"Display name","example":"GitHub MCP Server"},"description":{"type":["string","null"],"description":"Detailed description","example":"MCP server for GitHub operations"},"toolType":{"type":["string","null"],"description":"Tool category","enum":["SDK","MCP_SERVER","AI_SERVICE","REST_API","LOCAL_FUNCTION","CUSTOM"],"example":"MCP_SERVER"},"toolProvider":{"type":["string","null"],"description":"Provider/vendor","example":"anthropic"},"configSource":{"type":["string","null"],"description":"Configuration source","enum":["DATABASE","YAML","MERGED"],"example":"DATABASE","readOnly":true},"enabled":{"type":"boolean","default":true,"description":"Whether active for metering","example":true},"plan":{"type":"null","oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"pricing":{"type":"null","oneOf":[{"$ref":"#/components/schemas/ToolPricing_Read"},{"type":"null"}]},"_links":{"$ref":"#/components/schemas/Links"}},"required":["name","teamId","toolId","toolType"]},"ToolPricingElement_Read":{"type":"object","description":"Tool pricing element","properties":{"name":{"type":"string","description":"Element name","example":"requests"},"unitPrice":{"type":["string","null"],"description":"Price per unit","example":"0.10"},"aggregationType":{"type":"string","description":"Aggregation method","enum":["SUM","COUNT","AVERAGE","MAXIMUM","DISTINCT"],"example":"SUM"},"tiers":{"type":["array","null"],"description":"Volume-based pricing tiers","items":{"$ref":"#/components/schemas/ToolPricingTier_Read"}}}},"ToolPricingTier_Read":{"type":"object","description":"Tool pricing tier","properties":{"upTo":{"type":["integer","null"],"format":"int64","description":"Upper bound (null for unlimited)","example":1000},"unitPrice":{"type":"string","description":"Price per unit in tier","example":"0.10"}}},"ToolPricing_Read":{"type":"object","description":"Tool pricing configuration","properties":{"currency":{"type":"string","default":"USD","description":"Currency code","enum":["USD","EUR","CAD","GBP","JPY","CNY","MXN","COP","ARS","ZMW","AUD","ZWG"],"example":"USD"},"elements":{"type":["array","null"],"description":"Metering elements","items":{"$ref":"#/components/schemas/ToolPricingElement_Read"}}}},"TeamResource":{"type":"object","description":"team","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"team","readOnly":true},"label":{"type":"string","description":"The team's label (automatically set to the team name for display purposes)","example":"Weyland-Yutani Corporation","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the team","example":"Weyland-Yutani Corporation"},"externalId":{"type":["string","null"],"description":"The team's external id","example":"WY-1234"},"logo":{"type":["string","null"],"description":"The team's logo","example":"https://www.example.com/logo.png"},"address1":{"type":["string","null"],"description":"The team's address 1","example":"Main St."},"address2":{"type":["string","null"],"description":"The team's address 2","example":"Suite 100"},"city":{"type":["string","null"],"description":"The team's city address","example":"Brooklyn"},"state":{"type":["string","null"],"description":"The team's state address","example":"NY"},"country":{"type":["string","null"],"description":"The team's country","example":"USA"},"postalCode":{"type":["string","null"],"description":"The team's postal code","example":"11201"},"billingPhoneNumber":{"type":["string","null"],"description":"The team's billing phone number","example":"555-555-5555"},"phoneNumber":{"type":["string","null"],"description":"The team's phone number","example":"555-555-5555"},"emailAddress":{"type":["string","null"],"description":"The team's contact email address","example":"user@weylad-yutaini.io"},"remittanceInstructions":{"type":["string","null"],"description":"The team's remittance instructions","example":"Please remit payment to the address above"},"url":{"type":["string","null"],"description":"The team's website URL","example":"https://www.weylad-yutaini.io"},"currency":{"type":["string","null"],"description":"The team's currency","enum":["USD","EUR","CAD","GBP","JPY","CNY","MXN","COP","ARS","ZMW","AUD","ZWG"],"example":"USD"},"metadata":{"type":["string","null"],"description":"The team's metadata (in key / value pairs)","example":"{'key1': 'value1', 'key2': 'value2'}"},"domainAliases":{"type":["array","null"],"description":"The team's domain aliases","example":["weyland-yutani.com","wy-corp.com"],"items":{"type":"string"}},"types":{"type":["array","null"],"description":"The team type (array with single value). Teams must be type MANAGING, which represents internal business units or teams that manage consumer organizations and want to separate their usage and analytics by group. In the Revenium UI, MANAGING teams are displayed as 'Teams'. Note: If you attempt to create a team with type CONSUMING, it will create an organization instead (see /v2/api/organizations endpoint).","example":["MANAGING"],"items":{"type":"string","enum":["MANAGING"]}},"tenant":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"tenantId":{"type":["string","null"],"description":"The unique identifier of the tenant that owns this team","example":"6PV0xe","writeOnly":true},"parent":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"parentId":{"type":["string","null"],"description":"Optional. Only provide this when creating a sub-team that will exist under another team in the hierarchy. Omit when creating a top-level team. Format: Revenium hashid (URL-safe encoded string).","example":"a91XJp","writeOnly":true},"sourceAutoDiscoveryEnabled":{"type":["boolean","null"],"description":"Whether automatic discovery of data sources is enabled for this team. This should be set to true in most cases.","example":true},"promptCaptureEnabled":{"type":["boolean","null"],"description":"Whether prompt capture is enabled for this team. When enabled, prompts and completions are stored for observability. Can also be updated later via PUT /teams/{id}/settings/prompts.","example":false},"elementDefinitionAutoDiscoveryEnabled":{"type":["boolean","null"],"description":"Whether automatic discovery of metering element definitions is enabled for this tea. This should be set to true in almost all cases.","example":true},"billingEmail":{"type":["string","null"],"description":"The email address for billing-related communications","example":"billing@weyland-yutani.com"},"aiDataIngested":{"type":["boolean","null"],"description":"Whether AI usage data has been ingested for this team. This flag automatically updates the first time data has been properly received in your team.","example":false,"readOnly":true},"callCountElementDefinition":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"invoiceHoldingPeriod":{"type":["string","null"],"description":"The time period unit for holding invoices before processing","enum":["DAY","MONTH","YEAR","TEST_MINUTE","TEST_MINUTE_WITH_SYNTHETIC_METERING","NONE"],"example":"MONTH"},"invoiceHoldingPeriodCount":{"type":["integer","null"],"format":"int64","description":"The number of time periods to hold invoices before processing","example":3},"useV2InvoiceDataLoading":{"type":["boolean","null"],"description":"Whether to use the V2 invoice data loading system for this team, value set automatically.","example":true},"accountConfiguration":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"accountConfigurationId":{"type":["string","null"],"description":"The unique identifier of the account configuration for this team","example":"af75417c71d24e708f506596ce5ab675","writeOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["name","tenant"]},"TeamResource_Read":{"type":"object","description":"team","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"team","readOnly":true},"label":{"type":"string","description":"The team's label (automatically set to the team name for display purposes)","example":"Weyland-Yutani Corporation","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the team","example":"Weyland-Yutani Corporation"},"externalId":{"type":["string","null"],"description":"The team's external id","example":"WY-1234"},"logo":{"type":["string","null"],"description":"The team's logo","example":"https://www.example.com/logo.png"},"address1":{"type":["string","null"],"description":"The team's address 1","example":"Main St."},"address2":{"type":["string","null"],"description":"The team's address 2","example":"Suite 100"},"city":{"type":["string","null"],"description":"The team's city address","example":"Brooklyn"},"state":{"type":["string","null"],"description":"The team's state address","example":"NY"},"country":{"type":["string","null"],"description":"The team's country","example":"USA"},"postalCode":{"type":["string","null"],"description":"The team's postal code","example":"11201"},"billingPhoneNumber":{"type":["string","null"],"description":"The team's billing phone number","example":"555-555-5555"},"phoneNumber":{"type":["string","null"],"description":"The team's phone number","example":"555-555-5555"},"emailAddress":{"type":["string","null"],"description":"The team's contact email address","example":"user@weylad-yutaini.io"},"remittanceInstructions":{"type":["string","null"],"description":"The team's remittance instructions","example":"Please remit payment to the address above"},"url":{"type":["string","null"],"description":"The team's website URL","example":"https://www.weylad-yutaini.io"},"currency":{"type":["string","null"],"description":"The team's currency","enum":["USD","EUR","CAD","GBP","JPY","CNY","MXN","COP","ARS","ZMW","AUD","ZWG"],"example":"USD"},"metadata":{"type":["string","null"],"description":"The team's metadata (in key / value pairs)","example":"{'key1': 'value1', 'key2': 'value2'}"},"domainAliases":{"type":["array","null"],"description":"The team's domain aliases","example":["weyland-yutani.com","wy-corp.com"],"items":{"type":"string"}},"types":{"type":["array","null"],"description":"The team type (array with single value). Teams must be type MANAGING, which represents internal business units or teams that manage consumer organizations and want to separate their usage and analytics by group. In the Revenium UI, MANAGING teams are displayed as 'Teams'. Note: If you attempt to create a team with type CONSUMING, it will create an organization instead (see /v2/api/organizations endpoint).","example":["MANAGING"],"items":{"type":"string","enum":["MANAGING"]}},"tenant":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"tenantId":{"type":["string","null"],"description":"The unique identifier of the tenant that owns this team","example":"6PV0xe","writeOnly":true},"parent":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"parentId":{"type":["string","null"],"description":"Optional. Only provide this when creating a sub-team that will exist under another team in the hierarchy. Omit when creating a top-level team. Format: Revenium hashid (URL-safe encoded string).","example":"a91XJp","writeOnly":true},"sourceAutoDiscoveryEnabled":{"type":["boolean","null"],"description":"Whether automatic discovery of data sources is enabled for this team. This should be set to true in most cases.","example":true},"promptCaptureEnabled":{"type":["boolean","null"],"description":"Whether prompt capture is enabled for this team. When enabled, prompts and completions are stored for observability. Can also be updated later via PUT /teams/{id}/settings/prompts.","example":false},"elementDefinitionAutoDiscoveryEnabled":{"type":["boolean","null"],"description":"Whether automatic discovery of metering element definitions is enabled for this tea. This should be set to true in almost all cases.","example":true},"billingEmail":{"type":["string","null"],"description":"The email address for billing-related communications","example":"billing@weyland-yutani.com"},"aiDataIngested":{"type":["boolean","null"],"description":"Whether AI usage data has been ingested for this team. This flag automatically updates the first time data has been properly received in your team.","example":false,"readOnly":true},"callCountElementDefinition":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"invoiceHoldingPeriod":{"type":["string","null"],"description":"The time period unit for holding invoices before processing","enum":["DAY","MONTH","YEAR","TEST_MINUTE","TEST_MINUTE_WITH_SYNTHETIC_METERING","NONE"],"example":"MONTH"},"invoiceHoldingPeriodCount":{"type":["integer","null"],"format":"int64","description":"The number of time periods to hold invoices before processing","example":3},"useV2InvoiceDataLoading":{"type":["boolean","null"],"description":"Whether to use the V2 invoice data loading system for this team, value set automatically.","example":true},"accountConfiguration":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"accountConfigurationId":{"type":["string","null"],"description":"The unique identifier of the account configuration for this team","example":"af75417c71d24e708f506596ce5ab675","writeOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["name","tenant"]},"PromptSettingsResource":{"type":"object","description":"Team-level prompt capture configuration settings","properties":{"promptCaptureEnabled":{"type":"boolean","description":"Whether prompt capture is enabled for this team. When enabled, prompts sent by middleware will be stored. When disabled, any prompts sent will be discarded by the backend.","example":true},"systemMaxPromptLength":{"type":"integer","format":"int32","description":"System-wide maximum length (in characters) for captured prompts. This is a read-only value that applies to all teams. Prompts exceeding this length will be truncated by the middleware before sending.","example":50000,"readOnly":true}},"required":["promptCaptureEnabled"]},"MarketplaceSettingsResource_Write":{"type":"object","description":"Team internal (company-owned) Claude Code plugin marketplace settings","properties":{"internalMarketplaceNames":{"type":"array","description":"Marketplace names this team treats as internal/company-owned. Plugin skills from these marketplaces classify as ORGANIZATION rather than THIRD_PARTY.","example":["acme-internal","revenium-tools"],"items":{"type":"string"},"uniqueItems":true}},"required":["internalMarketplaceNames"]},"MarketplaceSettingsResource_Read":{"type":"object","description":"Team internal (company-owned) Claude Code plugin marketplace settings","properties":{"internalMarketplaceNames":{"type":"array","description":"Marketplace names this team treats as internal/company-owned. Plugin skills from these marketplaces classify as ORGANIZATION rather than THIRD_PARTY.","example":["acme-internal","revenium-tools"],"items":{"type":"string"},"uniqueItems":true}},"required":["internalMarketplaceNames"]},"CodingAssistantFilterSettingsResource":{"type":"object","description":"Team-level coding assistant pricing-mode settings","properties":{"enabled":{"type":"boolean","description":"Deprecated legacy visibility flag. Retained for stored policy compatibility.","example":true},"apiRateProviders":{"type":"array","description":"Coding assistant providers the team pays for at real API rates. These providers count as real spend everywhere. Unlisted providers are subscription or seat-based usage shown only as API-equivalent estimates on AI Assistant dashboards.","items":{"type":"string","enum":["ClaudeCode","ClaudeCowork","CursorIde","GeminiCli","CodexCli","GithubCopilot"]}},"defaultProviders":{"type":"array","description":"Deprecated legacy provider visibility list. Retained for stored policy compatibility.","items":{"type":"string","enum":["ClaudeCode","ClaudeCowork","CursorIde","GeminiCli","CodexCli","GithubCopilot"]}},"allowUserOverride":{"type":"boolean","description":"Deprecated legacy override flag. View-level filters are independent of pricing-mode policy.","example":false},"persistence":{"type":"string","description":"Persistence backing for this policy.","example":"appconfig","readOnly":true},"classificationSource":{"type":"string","description":"How pricing classification was resolved for this team.","example":"team_explicit","readOnly":true},"confidence":{"type":"string","description":"Resolution confidence for the active pricing policy.","example":"high","readOnly":true},"needsReview":{"type":"boolean","description":"True when the team is running on tenant defaults and should be explicitly configured.","example":true,"readOnly":true}},"required":["apiRateProviders","classificationSource","confidence","needsReview","persistence"]},"RatingAggregationQuota":{"type":"object","description":"Quota tracking for a rating aggregation that monitors usage consumption against defined limits. Tracks both total quota consumed and per-tier quota consumption for tiered pricing models","properties":{"ratingAggregationId":{"type":["string","null"],"description":"The unique identifier of the rating aggregation being tracked","example":"l3kR6l","readOnly":true},"ratingAggregationName":{"type":["string","null"],"description":"The name of the rating aggregation for display purposes","example":"API Calls by Region","readOnly":true},"ratingAggregationDistinctValue":{"type":["string","null"],"description":"The rating aggregation Distinct Value","example":"region","readOnly":true},"ratingAggregationType":{"type":["string","null"],"description":"The rating aggregation Type","enum":["SUM","COUNT","MAXIMUM","AVERAGE","UNIQUE","DISTINCT","LAST_RECEIVED"],"example":"SUM","readOnly":true},"elementDefinitionId":{"type":["string","null"],"description":"The identifier of the element definition that specifies which metric is being tracked","example":"3By6OgB","readOnly":true},"elementDefinitionName":{"type":["string","null"],"description":"The name of the element definition for display purposes","example":"API Request Count","readOnly":true},"elementDefinitionDescription":{"type":["string","null"],"description":"The description of the element definition explaining what metric is being measured","example":"Total number of API requests made to the service","readOnly":true},"totalQuotaConsumed":{"type":["number","null"],"description":"The total amount of quota consumed across all tiers. Represents the cumulative usage for this rating aggregation","example":15750.5,"readOnly":true},"tierQuotas":{"type":["array","null"],"description":"Quota consumption breakdown by pricing tier. Shows how much quota was consumed within each tier's usage range","items":{"$ref":"#/components/schemas/TierQuota"},"readOnly":true}}},"SubscriptionResource":{"type":"object","description":"A Subscription. Use subscriberEmail as the primary subscriber email field. The deprecated clientEmailAddress field remains accepted as an alias for compatibility.","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"subscription","readOnly":true},"label":{"type":"string","description":"The subscription's label (automatically set to the client's email address for display purposes)","example":"client@example.com","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the subscription","example":"my-awesome-subscription"},"owner":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"ownerId":{"type":["string","null"],"description":"The unique identifier of the subscription owner","example":"LjRrbJ","writeOnly":true},"client":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"subscriberEmail":{"type":["string","null"],"description":"The subscription subscriber email address. Required for create unless the deprecated clientEmailAddress alias is provided.","example":"subscriber@example.com"},"clientEmailAddress":{"type":["string","null"],"deprecated":true,"description":"Deprecated alias for subscriberEmail.","example":"subscriber@example.com"},"organization":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"organizationId":{"type":["string","null"],"description":"The organization id (set to UNCLASSIFIED if null)","example":"6PV0xe","writeOnly":true},"account":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"accountId":{"type":["string","null"],"description":"The account id","example":"af75417c71d24e708f506596ce5ab675","writeOnly":true},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this subscription","example":"a91XJp","writeOnly":true},"product":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"productId":{"type":["string","null"],"description":"The product associated with the subscription","example":"af75417c71d24e708f506596ce5ab675","writeOnly":true},"credentials":{"type":["array","null"],"description":"The credentials associated with the product","items":{"$ref":"#/components/schemas/ResourceMetadata"},"readOnly":true},"provisionedCredentialExternalId":{"type":["string","null"],"description":"The real externalId of the credential auto-provisioned by this create call (includeRelatedResources=true). Shown ONCE, in the create response only — credential read endpoints mask externalId, so this is the only place the generated value is obtainable. Use it as the `subscriberCredential` metering attribution handle.","readOnly":true},"credentialIds":{"type":["array","null"],"description":"The credential IDs associated with the product","example":["af75417c71d24e708f506596ce5ab675"],"items":{"type":"string"},"writeOnly":true},"expiration":{"type":["string","null"],"description":"The expiration of the subscription (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z"},"quotaNotificationThreshold":{"type":"number","format":"double","description":"The percentage of quota consumption to exceed before sending a notification","example":0.75},"notificationAddressesOnCreation":{"type":["array","null"],"description":"Additional email addresses for ProductKey creation notification","example":["admin@example.com"],"items":{"type":"string"}},"notificationAddressesOnQuotaThreshold":{"type":["array","null"],"description":"Additional email addresses for ProductKey quota notifications","example":["ops@example.com","billing@example.com"],"items":{"type":"string"}},"start":{"type":["string","null"],"description":"The subscription start date (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z"},"periodStart":{"type":["string","null"],"description":"Start date of current subscription period (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z"},"periodEnd":{"type":["string","null"],"description":"End date of current subscription period (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-30T23:59:59Z"},"trialEnd":{"type":["string","null"],"description":"End date of subscription trial period (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z"},"namedSubscribers":{"type":["array","null"],"description":"List of user email addresses who are allowed to access the subscription","example":["user1@example.com","user2@example.com"],"items":{"type":"string"}},"namedOrganizations":{"type":["array","null"],"description":"The named organizations associated with this subscription","items":{"$ref":"#/components/schemas/ResourceMetadata"},"readOnly":true},"namedOrganizationIds":{"type":["array","null"],"description":"The named organization IDs associated with this subscription","example":["6PV0xe"],"items":{"type":"string"},"writeOnly":true},"sendToSubscriber":{"type":["boolean","null"],"description":"Whether to send notifications to the subscriber","example":true},"quotas":{"type":["array","null"],"description":"The quotas associated with the subscription","items":{"$ref":"#/components/schemas/RatingAggregationQuota"},"readOnly":true},"identityProvider":{"type":["string","null"],"description":"The name of the identity provider","example":"Auth0"},"additionalInvoiceRecipients":{"type":["array","null"],"description":"Additional email addresses for invoice notifications","example":["finance@example.com","accounting@example.com"],"items":{"type":"string"}},"charge":{"type":["number","null"],"description":"The recurring charge associated with this subscription","example":99.99},"wentOverSubscriptionQuota":{"type":["boolean","null"],"description":"Went over subscription quota?","example":false},"tags":{"type":["array","null"],"description":"Tags associated with the subscription","example":["enterprise","annual"],"items":{"type":"string"}},"externalQuoteId":{"type":["string","null"],"description":"The quote the product key may be associated with in an external cpq / financial system","example":"quote-12345"},"allowImmediateCancellation":{"type":["boolean","null"],"description":"Allow immediate cancellation of the subscription","example":true},"tierQuotaNotificationThreshold":{"type":["number","null"],"format":"double","description":"The threshold Percentage for tier quota notifications","example":80},"subscriptionId":{"type":["string","null"],"description":"The subscription Id","example":"sub-abc123"},"periodCallCountConsumed":{"type":["number","null"],"format":"double","description":"The period call count consumed","readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["name","ownerId","productId","teamId"]},"TierQuota":{"type":"object","properties":{"tierName":{"type":["string","null"],"description":"The tier Name","readOnly":true},"tierId":{"type":["string","null"],"description":"The tier Id","readOnly":true},"tierQuotaConsumed":{"type":["number","null"],"description":"Amount of tier Quota consumed","example":4,"readOnly":true},"lowerTierQuotaLimit":{"type":["number","null"],"description":"Lower Tier Quota Limit","example":4,"readOnly":true},"tierQuota":{"type":["number","null"],"description":"Tier Quota","example":4,"readOnly":true},"wentOverTierQuota":{"type":["boolean","null"],"description":"True if tier quota has been exceeded","example":false,"readOnly":true}}},"RatingAggregationQuota_Write":{"type":"object","description":"Quota tracking for a rating aggregation that monitors usage consumption against defined limits. Tracks both total quota consumed and per-tier quota consumption for tiered pricing models","properties":{"ratingAggregationId":{"type":["string","null"],"description":"The unique identifier of the rating aggregation being tracked","example":"l3kR6l","readOnly":true},"ratingAggregationName":{"type":["string","null"],"description":"The name of the rating aggregation for display purposes","example":"API Calls by Region","readOnly":true},"ratingAggregationDistinctValue":{"type":["string","null"],"description":"The rating aggregation Distinct Value","example":"region","readOnly":true},"ratingAggregationType":{"type":["string","null"],"description":"The rating aggregation Type","enum":["SUM","COUNT","MAXIMUM","AVERAGE","UNIQUE","DISTINCT","LAST_RECEIVED"],"example":"SUM","readOnly":true},"elementDefinitionId":{"type":["string","null"],"description":"The identifier of the element definition that specifies which metric is being tracked","example":"3By6OgB","readOnly":true},"elementDefinitionName":{"type":["string","null"],"description":"The name of the element definition for display purposes","example":"API Request Count","readOnly":true},"elementDefinitionDescription":{"type":["string","null"],"description":"The description of the element definition explaining what metric is being measured","example":"Total number of API requests made to the service","readOnly":true},"totalQuotaConsumed":{"type":["number","null"],"description":"The total amount of quota consumed across all tiers. Represents the cumulative usage for this rating aggregation","example":15750.5,"readOnly":true},"tierQuotas":{"type":["array","null"],"description":"Quota consumption breakdown by pricing tier. Shows how much quota was consumed within each tier's usage range","items":{"$ref":"#/components/schemas/TierQuota_Write"},"readOnly":true}}},"SubscriptionResource_Write":{"type":"object","description":"A Subscription. Use subscriberEmail as the primary subscriber email field. The deprecated clientEmailAddress field remains accepted as an alias for compatibility.","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"subscription","readOnly":true},"label":{"type":"string","description":"The subscription's label (automatically set to the client's email address for display purposes)","example":"client@example.com","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the subscription","example":"my-awesome-subscription"},"owner":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Write"},{"type":"null"}]},"ownerId":{"type":["string","null"],"description":"The unique identifier of the subscription owner","example":"LjRrbJ","writeOnly":true},"client":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Write"},{"type":"null"}]},"subscriberEmail":{"type":["string","null"],"description":"The subscription subscriber email address. Required for create unless the deprecated clientEmailAddress alias is provided.","example":"subscriber@example.com"},"clientEmailAddress":{"type":["string","null"],"deprecated":true,"description":"Deprecated alias for subscriberEmail.","example":"subscriber@example.com"},"organization":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Write"},{"type":"null"}]},"organizationId":{"type":["string","null"],"description":"The organization id (set to UNCLASSIFIED if null)","example":"6PV0xe","writeOnly":true},"account":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Write"},{"type":"null"}]},"accountId":{"type":["string","null"],"description":"The account id","example":"af75417c71d24e708f506596ce5ab675","writeOnly":true},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Write"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this subscription","example":"a91XJp","writeOnly":true},"product":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Write"},{"type":"null"}]},"productId":{"type":["string","null"],"description":"The product associated with the subscription","example":"af75417c71d24e708f506596ce5ab675","writeOnly":true},"credentials":{"type":["array","null"],"description":"The credentials associated with the product","items":{"$ref":"#/components/schemas/ResourceMetadata_Write"},"readOnly":true},"provisionedCredentialExternalId":{"type":["string","null"],"description":"The real externalId of the credential auto-provisioned by this create call (includeRelatedResources=true). Shown ONCE, in the create response only — credential read endpoints mask externalId, so this is the only place the generated value is obtainable. Use it as the `subscriberCredential` metering attribution handle.","readOnly":true},"credentialIds":{"type":["array","null"],"description":"The credential IDs associated with the product","example":["af75417c71d24e708f506596ce5ab675"],"items":{"type":"string"},"writeOnly":true},"expiration":{"type":["string","null"],"description":"The expiration of the subscription (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z"},"quotaNotificationThreshold":{"type":"number","format":"double","description":"The percentage of quota consumption to exceed before sending a notification","example":0.75},"notificationAddressesOnCreation":{"type":["array","null"],"description":"Additional email addresses for ProductKey creation notification","example":["admin@example.com"],"items":{"type":"string"}},"notificationAddressesOnQuotaThreshold":{"type":["array","null"],"description":"Additional email addresses for ProductKey quota notifications","example":["ops@example.com","billing@example.com"],"items":{"type":"string"}},"start":{"type":["string","null"],"description":"The subscription start date (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z"},"periodStart":{"type":["string","null"],"description":"Start date of current subscription period (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z"},"periodEnd":{"type":["string","null"],"description":"End date of current subscription period (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-30T23:59:59Z"},"trialEnd":{"type":["string","null"],"description":"End date of subscription trial period (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z"},"namedSubscribers":{"type":["array","null"],"description":"List of user email addresses who are allowed to access the subscription","example":["user1@example.com","user2@example.com"],"items":{"type":"string"}},"namedOrganizations":{"type":["array","null"],"description":"The named organizations associated with this subscription","items":{"$ref":"#/components/schemas/ResourceMetadata_Write"},"readOnly":true},"namedOrganizationIds":{"type":["array","null"],"description":"The named organization IDs associated with this subscription","example":["6PV0xe"],"items":{"type":"string"},"writeOnly":true},"sendToSubscriber":{"type":["boolean","null"],"description":"Whether to send notifications to the subscriber","example":true},"quotas":{"type":["array","null"],"description":"The quotas associated with the subscription","items":{"$ref":"#/components/schemas/RatingAggregationQuota_Write"},"readOnly":true},"identityProvider":{"type":["string","null"],"description":"The name of the identity provider","example":"Auth0"},"additionalInvoiceRecipients":{"type":["array","null"],"description":"Additional email addresses for invoice notifications","example":["finance@example.com","accounting@example.com"],"items":{"type":"string"}},"charge":{"type":["number","null"],"description":"The recurring charge associated with this subscription","example":99.99},"wentOverSubscriptionQuota":{"type":["boolean","null"],"description":"Went over subscription quota?","example":false},"tags":{"type":["array","null"],"description":"Tags associated with the subscription","example":["enterprise","annual"],"items":{"type":"string"}},"externalQuoteId":{"type":["string","null"],"description":"The quote the product key may be associated with in an external cpq / financial system","example":"quote-12345"},"allowImmediateCancellation":{"type":["boolean","null"],"description":"Allow immediate cancellation of the subscription","example":true},"tierQuotaNotificationThreshold":{"type":["number","null"],"format":"double","description":"The threshold Percentage for tier quota notifications","example":80},"subscriptionId":{"type":["string","null"],"description":"The subscription Id","example":"sub-abc123"},"periodCallCountConsumed":{"type":["number","null"],"format":"double","description":"The period call count consumed","readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["name","ownerId","productId","teamId"]},"TierQuota_Write":{"type":"object","properties":{"tierName":{"type":["string","null"],"description":"The tier Name","readOnly":true},"tierId":{"type":["string","null"],"description":"The tier Id","readOnly":true},"tierQuotaConsumed":{"type":["number","null"],"description":"Amount of tier Quota consumed","example":4,"readOnly":true},"lowerTierQuotaLimit":{"type":["number","null"],"description":"Lower Tier Quota Limit","example":4,"readOnly":true},"tierQuota":{"type":["number","null"],"description":"Tier Quota","example":4,"readOnly":true},"wentOverTierQuota":{"type":["boolean","null"],"description":"True if tier quota has been exceeded","example":false,"readOnly":true}}},"SubscriberResource_Write":{"type":"object","description":"subscriber","properties":{"id":{"type":"string","description":"The unique ID","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"user","readOnly":true},"label":{"type":"string","description":"The subscriber's label (automatically set to the email address for display purposes)","example":"user@example.com","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"email":{"type":"string","description":"The email address of the user","example":"ash@weyland-yutani.io"},"firstName":{"type":["string","null"],"description":"The first name of the user","example":"Ash"},"lastName":{"type":["string","null"],"description":"The last name of the user","example":"Williams"},"phoneNumber":{"type":["string","null"],"description":"The phone number associated with the user","example":"001-718-555-5555"},"tenant":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Write"},{"type":"null"}]},"organizations":{"type":["array","null"],"description":"The organizations the user belongs to","items":{"$ref":"#/components/schemas/ResourceMetadata_Write"},"readOnly":true},"organizationIds":{"type":"array","description":"The organization IDs the user belongs to","example":["6PV0xe"],"items":{"type":"string"},"writeOnly":true},"subscriberId":{"type":["string","null"],"description":"The ID of the subscriber","example":"pEjxgX"},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["email"]},"SubscriberResource_Read":{"type":"object","description":"subscriber","properties":{"id":{"type":"string","description":"The unique ID","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"user","readOnly":true},"label":{"type":"string","description":"The subscriber's label (automatically set to the email address for display purposes)","example":"user@example.com","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"email":{"type":"string","description":"The email address of the user","example":"ash@weyland-yutani.io"},"firstName":{"type":["string","null"],"description":"The first name of the user","example":"Ash"},"lastName":{"type":["string","null"],"description":"The last name of the user","example":"Williams"},"phoneNumber":{"type":["string","null"],"description":"The phone number associated with the user","example":"001-718-555-5555"},"tenant":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"organizations":{"type":["array","null"],"description":"The organizations the user belongs to","items":{"$ref":"#/components/schemas/ResourceMetadata_Read"},"readOnly":true},"organizationIds":{"type":"array","description":"The organization IDs the user belongs to","example":["6PV0xe"],"items":{"type":"string"},"writeOnly":true},"subscriberId":{"type":["string","null"],"description":"The ID of the subscriber","example":"pEjxgX"},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["email"]},"SourceClassification_Write":{"type":"object","description":"Pattern-based classification rule for automatically categorizing API sources based on their URL or path. Supports multiple matching strategies including prefix, suffix, substring, exact match, and regular expression patterns","properties":{"beginsWith":{"type":["string","null"],"description":"Prefix pattern to match against the source URL or path. If the source starts with this string, the classification rule matches","example":"/api/v2/"},"endsWith":{"type":["string","null"],"description":"Suffix pattern to match against the source URL or path. If the source ends with this string, the classification rule matches","example":"/health"},"contains":{"type":["string","null"],"description":"Substring pattern to match against the source URL or path. If the source contains this string anywhere, the classification rule matches","example":"/internal/"},"regex":{"type":["string","null"],"description":"Regular expression pattern to match against the source URL or path. Provides flexible pattern matching for complex classification rules","example":"^/api/v[0-9]+/users/.*$"},"equalsTo":{"type":["string","null"],"description":"Exact match pattern for the source URL or path. The source must exactly match this string for the classification rule to apply","example":"/api/v2/products"}}},"SourceResource_Write":{"type":"object","description":"source","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"source","readOnly":true},"label":{"type":"string","description":"The source's label (automatically set to the source name for display purposes)","example":"my-awesome-source","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the source","example":"my-awesome-source"},"description":{"type":["string","null"],"description":"The description of the source","example":"Truly an awesome data source"},"version":{"type":"string","description":"The source's version","example":"1.0.0"},"descriptionAsHTML":{"type":["string","null"],"description":"The description of the source (HTML formatted)","example":"<b>Truly an awesome data source</b>"},"type":{"type":"string","description":"The type of the source","enum":["API","AI","UNCLASSIFIED","RESOURCE","CONNECTOR","TEMPLATE","POLICY","STREAM","CONSUMER_DATA","CUSTOM","APP","ROUTE"],"example":"API"},"autoDiscoveryEnabled":{"type":["boolean","null"],"description":"Whether or not the source is auto-discovered","example":false},"resource":{"type":["string","null"],"description":"The source's unique resource / URI","example":"/api/products"},"method":{"type":["string","null"],"description":"The source's method","example":"GET"},"logoURL":{"type":["string","null"],"description":"Path for the Assets' logo","example":"https://example.com/logo.png","readOnly":true},"devPortalLink":{"type":["string","null"],"description":"The devPortalLink of the asset","example":"https://devportal.example.com/my-awesome-source"},"sourceType":{"type":["string","null"],"description":"The source type of the asset (ie, MULESOFT, etc)","enum":["UNKNOWN","AI","SDK_PYTHON","SDK_JS","SDK_JVM","SDK_SPRING","SDK_DOTNET","SDK_GOLANG","SDK_RUST","EBPF","AWS","AZURE","SNOWFLAKE","GRAVITEE","MULESOFT","BOOMI","REVENIUM","INTERNAL"],"example":"MULESOFT"},"externalId":{"type":["string","null"],"description":"The external id associated with the source (generally an ID in an APIM platform)","example":"ext-source-001"},"externalUsagePlanId":{"type":["string","null"],"description":"The external plan id associated with the source (generally a usage plan in an APIM platform)","example":"usage-plan-abc123"},"tags":{"type":["array","null"],"description":"Tags associated with the source","example":["production","api","v1"],"items":{"type":"string"}},"sourceClassifications":{"type":["array","null"],"description":"The source classifications","example":[],"items":{"$ref":"#/components/schemas/SourceClassification_Write"}},"owner":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Write"},{"type":"null"}]},"ownerId":{"type":["string","null"],"description":"The unique identifier of the source owner","example":"LjRrbJ","writeOnly":true},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Write"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this source","example":"a91XJp","writeOnly":true},"environment":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Write"},{"type":"null"}]},"meteringElementDefinitions":{"type":["array","null"],"description":"The metering element definitions associated with the source","items":{"$ref":"#/components/schemas/ResourceMetadata_Write"},"readOnly":true},"products":{"type":["array","null"],"description":"The products associated with the source","items":{"$ref":"#/components/schemas/ResourceMetadata_Write"},"readOnly":true},"meteringElementDefinitionIds":{"type":["array","null"],"description":"The metering element definition IDs associated with the source","example":["af75417c71d24e708f506596ce5ab675","bf86528d82e54f1a7df96ca7de747786"],"items":{"type":"string"},"writeOnly":true},"contracts":{"type":["array","null"],"description":"The API contract/specifications associated with the source","items":{"$ref":"#/components/schemas/ResourceMetadata_Write"},"readOnly":true},"contractIds":{"type":["array","null"],"description":"The API contract/specifications IDs associated with the source","example":["af75417c71d24e708f506596ce5ab675"],"items":{"type":"string"},"writeOnly":true},"meteringId":{"type":["string","null"],"description":"The metering id associated with the source","readOnly":true},"metadata":{"type":["string","null"],"description":"Metadata","example":"language=En,test=test"},"assetUsageIdentifier":{"type":["string","null"],"description":"Type of metering identification for source","enum":["CUSTOM_ID","API_ENDPOINT","REVENIUM_ID"],"example":"REVENIUM_ID"},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["name","ownerId","teamId","type","version"]},"SourceClassification_Read":{"type":"object","description":"Pattern-based classification rule for automatically categorizing API sources based on their URL or path. Supports multiple matching strategies including prefix, suffix, substring, exact match, and regular expression patterns","properties":{"beginsWith":{"type":["string","null"],"description":"Prefix pattern to match against the source URL or path. If the source starts with this string, the classification rule matches","example":"/api/v2/"},"endsWith":{"type":["string","null"],"description":"Suffix pattern to match against the source URL or path. If the source ends with this string, the classification rule matches","example":"/health"},"contains":{"type":["string","null"],"description":"Substring pattern to match against the source URL or path. If the source contains this string anywhere, the classification rule matches","example":"/internal/"},"regex":{"type":["string","null"],"description":"Regular expression pattern to match against the source URL or path. Provides flexible pattern matching for complex classification rules","example":"^/api/v[0-9]+/users/.*$"},"equalsTo":{"type":["string","null"],"description":"Exact match pattern for the source URL or path. The source must exactly match this string for the classification rule to apply","example":"/api/v2/products"}}},"SourceResource_Read":{"type":"object","description":"source","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"source","readOnly":true},"label":{"type":"string","description":"The source's label (automatically set to the source name for display purposes)","example":"my-awesome-source","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the source","example":"my-awesome-source"},"description":{"type":["string","null"],"description":"The description of the source","example":"Truly an awesome data source"},"version":{"type":"string","description":"The source's version","example":"1.0.0"},"descriptionAsHTML":{"type":["string","null"],"description":"The description of the source (HTML formatted)","example":"<b>Truly an awesome data source</b>"},"type":{"type":"string","description":"The type of the source","enum":["API","AI","UNCLASSIFIED","RESOURCE","CONNECTOR","TEMPLATE","POLICY","STREAM","CONSUMER_DATA","CUSTOM","APP","ROUTE"],"example":"API"},"autoDiscoveryEnabled":{"type":["boolean","null"],"description":"Whether or not the source is auto-discovered","example":false},"resource":{"type":["string","null"],"description":"The source's unique resource / URI","example":"/api/products"},"method":{"type":["string","null"],"description":"The source's method","example":"GET"},"logoURL":{"type":["string","null"],"description":"Path for the Assets' logo","example":"https://example.com/logo.png","readOnly":true},"devPortalLink":{"type":["string","null"],"description":"The devPortalLink of the asset","example":"https://devportal.example.com/my-awesome-source"},"sourceType":{"type":["string","null"],"description":"The source type of the asset (ie, MULESOFT, etc)","enum":["UNKNOWN","AI","SDK_PYTHON","SDK_JS","SDK_JVM","SDK_SPRING","SDK_DOTNET","SDK_GOLANG","SDK_RUST","EBPF","AWS","AZURE","SNOWFLAKE","GRAVITEE","MULESOFT","BOOMI","REVENIUM","INTERNAL"],"example":"MULESOFT"},"externalId":{"type":["string","null"],"description":"The external id associated with the source (generally an ID in an APIM platform)","example":"ext-source-001"},"externalUsagePlanId":{"type":["string","null"],"description":"The external plan id associated with the source (generally a usage plan in an APIM platform)","example":"usage-plan-abc123"},"tags":{"type":["array","null"],"description":"Tags associated with the source","example":["production","api","v1"],"items":{"type":"string"}},"sourceClassifications":{"type":["array","null"],"description":"The source classifications","example":[],"items":{"$ref":"#/components/schemas/SourceClassification_Read"}},"owner":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"ownerId":{"type":["string","null"],"description":"The unique identifier of the source owner","example":"LjRrbJ","writeOnly":true},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this source","example":"a91XJp","writeOnly":true},"environment":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"meteringElementDefinitions":{"type":["array","null"],"description":"The metering element definitions associated with the source","items":{"$ref":"#/components/schemas/ResourceMetadata_Read"},"readOnly":true},"products":{"type":["array","null"],"description":"The products associated with the source","items":{"$ref":"#/components/schemas/ResourceMetadata_Read"},"readOnly":true},"meteringElementDefinitionIds":{"type":["array","null"],"description":"The metering element definition IDs associated with the source","example":["af75417c71d24e708f506596ce5ab675","bf86528d82e54f1a7df96ca7de747786"],"items":{"type":"string"},"writeOnly":true},"contracts":{"type":["array","null"],"description":"The API contract/specifications associated with the source","items":{"$ref":"#/components/schemas/ResourceMetadata_Read"},"readOnly":true},"contractIds":{"type":["array","null"],"description":"The API contract/specifications IDs associated with the source","example":["af75417c71d24e708f506596ce5ab675"],"items":{"type":"string"},"writeOnly":true},"meteringId":{"type":["string","null"],"description":"The metering id associated with the source","readOnly":true},"metadata":{"type":["string","null"],"description":"Metadata","example":"language=En,test=test"},"assetUsageIdentifier":{"type":["string","null"],"description":"Type of metering identification for source","enum":["CUSTOM_ID","API_ENDPOINT","REVENIUM_ID"],"example":"REVENIUM_ID"},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["name","ownerId","teamId","type","version"]},"PricingDimensionResource_Read":{"type":"object","description":"A pricing dimension for multi-modal AI model pricing","properties":{"id":{"type":["string","null"],"description":"The unique identifier of the pricing dimension (null for new dimensions)","example":"abc123","readOnly":true},"billingUnit":{"type":"string","description":"The billing unit type (PER_TOKEN, PER_IMAGE, PER_SECOND, PER_MINUTE, PER_CHARACTER, CREDITS)","enum":["PER_TOKEN","PER_IMAGE","PER_SECOND","PER_MINUTE","PER_CHARACTER","CREDITS"],"example":"PER_IMAGE"},"modality":{"type":"string","description":"The modality type (TEXT, IMAGE, AUDIO, VIDEO)","enum":["TEXT","IMAGE","AUDIO","VIDEO"],"example":"IMAGE"},"operationSubtype":{"type":["string","null"],"description":"Optional operation subtype (e.g., 'input', 'output', 'generation', 'transcription')","example":"generation"},"direction":{"type":["string","null"],"description":"Pricing direction: INPUT, OUTPUT, or BIDIRECTIONAL","enum":["INPUT","OUTPUT","BIDIRECTIONAL"],"example":"INPUT"},"unitPrice":{"type":"number","description":"The price per unit in USD","example":0.04},"costType":{"type":"string","description":"The cost type classification for analytics (e.g., IMAGE_GENERATION, AUDIO_TRANSCRIPTION)","enum":["AI","TEXT_TOKEN_INPUT","TEXT_TOKEN_OUTPUT","TEXT_TOKEN_CACHE_CREATION","TEXT_TOKEN_CACHE_READ","IMAGE_GENERATION","AUDIO_TRANSCRIPTION","AUDIO_GENERATION","VIDEO_GENERATION","CREDITS"],"example":"IMAGE_GENERATION"},"attributes":{"type":["string","null"],"description":"Optional JSON string containing additional attributes (e.g., resolution, quality, region)","example":{"resolution":"1024x1024","quality":"standard"}},"tenantCreditRate":{"type":["number","null"],"description":"Tenant-specific credit-to-currency rate (only applicable when billingUnit is CREDITS)","example":0.01},"isGlobal":{"type":"boolean","description":"True if this is a global (provider list) price, false if tenant-specific override","readOnly":true}},"required":["billingUnit","costType","modality","unitPrice"]},"AIModelResource":{"type":"object","description":"AI model metadata","properties":{"id":{"type":"string","description":"The unique identifier of the AI model","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"ai_model_metadata","readOnly":true},"label":{"type":"string","description":"The AI model's label (automatically set to the model name for display purposes)","example":"GPT-4 Turbo","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the model","example":"gpt-4-turbo"},"provider":{"type":"string","description":"The AI model provider. Allowed values: OPENAI, ANTHROPIC, OLLAMA, LITELLM, ALIBABA, GEMMA, DEEPSEEK, GOOGLE, GEMINI, AMAZON, CUSTOM","enum":["OPENAI","ANTHROPIC","OLLAMA","LITELLM","ALIBABA","GEMMA","DEEPSEEK","GOOGLE","GEMINI","AMAZON","CUSTOM"],"example":"OPENAI"},"inputCostPerToken":{"type":"number","description":"The cost per input token in USD","example":0.00001},"outputCostPerToken":{"type":"number","description":"The cost per output token in USD","example":0.00003},"cacheCreationCostPerInputToken":{"type":["number","null"],"description":"The cost per input token for cache creation in USD (for models that support prompt caching)","example":0.0000125},"cacheCreation1hrCostPerInputToken":{"type":["number","null"],"description":"The cost per input token for 1-hour-TTL cache creation in USD (for models that support prompt caching)","example":0.00002},"cacheReadCostPerInputToken":{"type":["number","null"],"description":"The cost per input token for cache reads in USD (for models that support prompt caching)","example":0.000001},"mode":{"type":"string","description":"The model mode or variant (e.g., 'chat', 'completion', 'embedding')","example":"chat"},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this AI model configuration. This field should be included in the request body when creating a new AI model.","example":"a91XJp","writeOnly":true},"supportFunctionCalling":{"type":["boolean","null"],"description":"Indicates if the model supports function calling","example":true},"supportsParallelFunctionCalling":{"type":["boolean","null"],"description":"Indicates if the model supports parallel function calling","example":true},"supportsResponseSchema":{"type":["boolean","null"],"description":"Indicates if the model supports response schema","example":true},"supportsVision":{"type":["boolean","null"],"description":"Indicates if the model supports vision capabilities","example":false},"supportsPromptCaching":{"type":["boolean","null"],"description":"Indicates if the model supports prompt caching","example":true},"supportsSystemMessages":{"type":["boolean","null"],"description":"Indicates if the model supports system messages","example":true},"supportsToolChoice":{"type":["boolean","null"],"description":"Indicates if the model supports tool choice","example":true},"supportsWebSearch":{"type":["boolean","null"],"description":"Indicates if the model supports web search","example":false},"pricingDimensions":{"type":"array","description":"All pricing dimensions for this model (token, image, audio, video, etc.). Empty if no dimensions are configured.","example":[],"items":{"$ref":"#/components/schemas/PricingDimensionResource"},"readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["inputCostPerToken","name","outputCostPerToken","provider"]},"PricingDimensionResource":{"type":"object","description":"A pricing dimension for multi-modal AI model pricing","properties":{"id":{"type":["string","null"],"description":"The unique identifier of the pricing dimension (null for new dimensions)","example":"abc123","readOnly":true},"billingUnit":{"type":"string","description":"The billing unit type (PER_TOKEN, PER_IMAGE, PER_SECOND, PER_MINUTE, PER_CHARACTER, CREDITS)","enum":["PER_TOKEN","PER_IMAGE","PER_SECOND","PER_MINUTE","PER_CHARACTER","CREDITS"],"example":"PER_IMAGE"},"modality":{"type":"string","description":"The modality type (TEXT, IMAGE, AUDIO, VIDEO)","enum":["TEXT","IMAGE","AUDIO","VIDEO"],"example":"IMAGE"},"operationSubtype":{"type":["string","null"],"description":"Optional operation subtype (e.g., 'input', 'output', 'generation', 'transcription')","example":"generation"},"direction":{"type":["string","null"],"description":"Pricing direction: INPUT, OUTPUT, or BIDIRECTIONAL","enum":["INPUT","OUTPUT","BIDIRECTIONAL"],"example":"INPUT"},"unitPrice":{"type":"number","description":"The price per unit in USD","example":0.04},"costType":{"type":"string","description":"The cost type classification for analytics (e.g., IMAGE_GENERATION, AUDIO_TRANSCRIPTION)","enum":["AI","TEXT_TOKEN_INPUT","TEXT_TOKEN_OUTPUT","TEXT_TOKEN_CACHE_CREATION","TEXT_TOKEN_CACHE_READ","IMAGE_GENERATION","AUDIO_TRANSCRIPTION","AUDIO_GENERATION","VIDEO_GENERATION","CREDITS"],"example":"IMAGE_GENERATION"},"attributes":{"type":["string","null"],"description":"Optional JSON string containing additional attributes (e.g., resolution, quality, region)","example":{"resolution":"1024x1024","quality":"standard"}},"tenantCreditRate":{"type":["number","null"],"description":"Tenant-specific credit-to-currency rate (only applicable when billingUnit is CREDITS)","example":0.01},"isGlobal":{"type":"boolean","description":"True if this is a global (provider list) price, false if tenant-specific override","readOnly":true}},"required":["billingUnit","costType","modality","unitPrice"]},"AIAnomalyFilter_Write":{"type":"object","description":"Filter criteria for querying AI anomaly detection results. Enables filtering anomalies by dimension (organization, product, model, etc.), comparison operator, and target value","properties":{"dimension":{"type":"string","description":"The dimension to filter on. Dimensions represent different aspects of AI usage that can be filtered","enum":["ORGANIZATION","CREDENTIAL","PRODUCT","MODEL","PROVIDER","AGENT","SUBSCRIBER","TASK_TYPE","WORKSPACE","API_KEY"]},"operator":{"type":"string","description":"The comparison operator to apply when filtering. Determines how the dimension value is compared against the filter value","enum":["IS","IS_NOT","CONTAINS","STARTS_WITH","ENDS_WITH"]},"value":{"type":"string","description":"The value to compare against using the specified operator. The format depends on the dimension being filtered","example":"gpt-4"}},"required":["dimension","operator","value"]},"AIAnomalyResource_Write":{"type":"object","description":"AI anomaly alert configuration for monitoring AI metrics and costs. Supports threshold-based alerts, relative change detection, and cumulative usage tracking","properties":{"id":{"type":"string","description":"The unique identifier of the AI anomaly","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"ai_anomaly_metadata","readOnly":true},"label":{"type":"string","description":"The AI anomaly alert's label (automatically set to the alert name for display purposes)","example":"High Cost Anomaly - GPT-4","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"createdBy":{"type":["string","null"],"description":"The email address of the user who created this anomaly","example":"user@example.com","readOnly":true},"modifiedBy":{"type":["string","null"],"description":"The email address of the user who last modified this anomaly","example":"user@example.com","readOnly":true},"name":{"type":"string","description":"The name of the anomaly alert","example":"High Cost Alert"},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Write"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this anomaly alert.  The teamId can be found in the developer section of the Revenium web application.","example":"a91XJp","writeOnly":true},"alertType":{"type":"string","description":"The type of alert monitoring strategy. THRESHOLD monitors for absolute values exceeding a threshold, RELATIVE_CHANGE monitors for percentage changes between periods, CUMULATIVE_USAGE monitors for total usage over a period","enum":["THRESHOLD","RELATIVE_CHANGE","CUMULATIVE_USAGE"],"example":"THRESHOLD"},"dataSource":{"type":["string","null"],"description":"The data source for this alert. SDK uses real-time SDK instrumentation data, PROVIDER uses provider-synced billing data (OpenAI, Anthropic, etc.)","enum":["SDK","PROVIDER"],"example":"SDK"},"metricType":{"type":"string","description":"The AI metric to monitor. Cost metrics track spending, token metrics track usage, performance metrics track latency and duration, error metrics track failures","enum":["TOTAL_COST","COST_PER_TRANSACTION","TOKENS_PER_MINUTE","TOKEN_COUNT","INPUT_TOKEN_COUNT","OUTPUT_TOKEN_COUNT","CACHED_TOKEN_COUNT","TOKENS_PER_REQUEST","TIME_TO_FIRST_TOKEN","DURATION","ERROR_COUNT","ERROR_RATE","REQUESTS_PER_MINUTE","IMAGE_COUNT","DURATION_SECONDS","CHARACTER_COUNT","CREDITS_CONSUMED","COST_PER_IMAGE","COST_PER_SECOND","VIDEO_COUNT","AUDIO_COUNT"],"example":"TOTAL_COST"},"operatorType":{"type":"string","description":"The comparison operator used to evaluate the threshold. Comparison operators (GREATER_THAN, LESS_THAN, EQUAL_TO, NOT_EQUAL_TO, GREATER_THAN_OR_EQUAL_TO, LESS_THAN_OR_EQUAL_TO) compare absolute values. Change operators (PERCENT_INCREASE, PERCENT_DECREASE, INCREASES_BY, DECREASES_BY) compare relative changes between periods","enum":["GREATER_THAN","LESS_THAN","EQUAL_TO","NOT_EQUAL_TO","GREATER_THAN_OR_EQUAL_TO","LESS_THAN_OR_EQUAL_TO","PERCENT_DECREASE","PERCENT_INCREASE","INCREASES_BY","DECREASES_BY"],"example":"GREATER_THAN"},"threshold":{"type":"number","description":"The numeric threshold value that triggers the alert. For percentage-based alerts (when isPercentage is true), this represents the percentage value (e.g., 50 for 50%). For absolute value alerts, this is the metric value to compare against","example":100.5},"notificationAddresses":{"type":"array","description":"Email addresses to notify when the alert is triggered. Multiple addresses can be specified. Each address will receive an email notification when the anomaly condition is met","example":["admin@example.com","ops@example.com"],"items":{"type":"string"}},"slackConfigurations":{"type":"array","description":"Slack configuration IDs to notify when the alert is triggered. Each configuration represents a Slack workspace and channel where notifications will be posted","example":["slack-config-id-1","slack-config-id-2"],"items":{"type":"string"}},"description":{"type":["string","null"],"description":"Optional description providing additional context about the alert's purpose and configuration","example":"Monitors total AI costs to prevent budget overruns"},"periodDuration":{"type":["string","null"],"description":"The time period over which the metric is evaluated. For THRESHOLD and RELATIVE_CHANGE alerts, this determines the evaluation window. For CUMULATIVE_USAGE alerts, this determines the accumulation period","enum":["ONE_MINUTE","FIVE_MINUTES","FIFTEEN_MINUTES","THIRTY_MINUTES","ONE_HOUR","TWELVE_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","DAILY","WEEKLY","MONTHLY","QUARTERLY"],"example":"ONE_HOUR"},"enabled":{"type":"boolean","description":"Whether the anomaly alert is active. When false, the alert is disabled without being deleted from the database. Disabled alerts do not evaluate conditions or send notifications","example":true},"filters":{"type":["array","null"],"description":"Filter criteria to limit the scope of anomaly monitoring. Each filter specifies a dimension (e.g., ORGANIZATION, PRODUCT, MODEL), an operator (e.g., IS, CONTAINS), and a value to match. Only metrics matching all filters are evaluated","items":{"$ref":"#/components/schemas/AIAnomalyFilter_Write"}},"webhookConfigurations":{"type":"array","description":"Webhook configuration IDs to notify when the alert is triggered. Each configuration represents a webhook endpoint that will receive a POST request with alert details","example":["webhook-config-id-1"],"items":{"type":"string"}},"firing":{"type":"boolean","description":"Whether the anomaly alert is currently triggered. True indicates the alert condition is currently met and notifications have been sent. This is a read-only field automatically updated by the system","example":false,"readOnly":true},"groupBy":{"type":["string","null"],"description":"The dimension by which to group anomaly monitoring. When specified, separate alerts are evaluated for each unique value of this dimension (e.g., per ORGANIZATION, per MODEL, per PRODUCT)","enum":["ORGANIZATION","CREDENTIAL","PRODUCT","MODEL","PROVIDER","AGENT","SUBSCRIBER","TASK_TYPE","WORKSPACE","API_KEY"],"example":"MODEL"},"triggerAfterPersistsDuration":{"type":["string","null"],"description":"The duration the anomaly condition must persist before triggering the alert. This prevents false positives from transient spikes. If null, the alert triggers immediately when the condition is met","enum":["ONE_MINUTE","FIVE_MINUTES","FIFTEEN_MINUTES","THIRTY_MINUTES","ONE_HOUR","TWELVE_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","DAILY","WEEKLY","MONTHLY","QUARTERLY"],"example":"FIVE_MINUTES"},"isPercentage":{"type":["boolean","null"],"description":"Whether the threshold value represents a percentage. When true, the threshold is interpreted as a percentage value. When false or null, the threshold is an absolute value","example":false},"_links":{"$ref":"#/components/schemas/Links"}},"required":["alertType","enabled","firing","metricType","name","operatorType","periodDuration","teamId","threshold"]},"AIAnomalyFilter_Read":{"type":"object","description":"Filter criteria for querying AI anomaly detection results. Enables filtering anomalies by dimension (organization, product, model, etc.), comparison operator, and target value","properties":{"dimension":{"type":"string","description":"The dimension to filter on. Dimensions represent different aspects of AI usage that can be filtered","enum":["ORGANIZATION","CREDENTIAL","PRODUCT","MODEL","PROVIDER","AGENT","SUBSCRIBER","TASK_TYPE","WORKSPACE","API_KEY"]},"operator":{"type":"string","description":"The comparison operator to apply when filtering. Determines how the dimension value is compared against the filter value","enum":["IS","IS_NOT","CONTAINS","STARTS_WITH","ENDS_WITH"]},"value":{"type":"string","description":"The value to compare against using the specified operator. The format depends on the dimension being filtered","example":"gpt-4"}},"required":["dimension","operator","value"]},"AIAnomalyResource_Read":{"type":"object","description":"AI anomaly alert configuration for monitoring AI metrics and costs. Supports threshold-based alerts, relative change detection, and cumulative usage tracking","properties":{"id":{"type":"string","description":"The unique identifier of the AI anomaly","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"ai_anomaly_metadata","readOnly":true},"label":{"type":"string","description":"The AI anomaly alert's label (automatically set to the alert name for display purposes)","example":"High Cost Anomaly - GPT-4","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"createdBy":{"type":["string","null"],"description":"The email address of the user who created this anomaly","example":"user@example.com","readOnly":true},"modifiedBy":{"type":["string","null"],"description":"The email address of the user who last modified this anomaly","example":"user@example.com","readOnly":true},"name":{"type":"string","description":"The name of the anomaly alert","example":"High Cost Alert"},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this anomaly alert.  The teamId can be found in the developer section of the Revenium web application.","example":"a91XJp","writeOnly":true},"alertType":{"type":"string","description":"The type of alert monitoring strategy. THRESHOLD monitors for absolute values exceeding a threshold, RELATIVE_CHANGE monitors for percentage changes between periods, CUMULATIVE_USAGE monitors for total usage over a period","enum":["THRESHOLD","RELATIVE_CHANGE","CUMULATIVE_USAGE"],"example":"THRESHOLD"},"dataSource":{"type":["string","null"],"description":"The data source for this alert. SDK uses real-time SDK instrumentation data, PROVIDER uses provider-synced billing data (OpenAI, Anthropic, etc.)","enum":["SDK","PROVIDER"],"example":"SDK"},"metricType":{"type":"string","description":"The AI metric to monitor. Cost metrics track spending, token metrics track usage, performance metrics track latency and duration, error metrics track failures","enum":["TOTAL_COST","COST_PER_TRANSACTION","TOKENS_PER_MINUTE","TOKEN_COUNT","INPUT_TOKEN_COUNT","OUTPUT_TOKEN_COUNT","CACHED_TOKEN_COUNT","TOKENS_PER_REQUEST","TIME_TO_FIRST_TOKEN","DURATION","ERROR_COUNT","ERROR_RATE","REQUESTS_PER_MINUTE","IMAGE_COUNT","DURATION_SECONDS","CHARACTER_COUNT","CREDITS_CONSUMED","COST_PER_IMAGE","COST_PER_SECOND","VIDEO_COUNT","AUDIO_COUNT"],"example":"TOTAL_COST"},"operatorType":{"type":"string","description":"The comparison operator used to evaluate the threshold. Comparison operators (GREATER_THAN, LESS_THAN, EQUAL_TO, NOT_EQUAL_TO, GREATER_THAN_OR_EQUAL_TO, LESS_THAN_OR_EQUAL_TO) compare absolute values. Change operators (PERCENT_INCREASE, PERCENT_DECREASE, INCREASES_BY, DECREASES_BY) compare relative changes between periods","enum":["GREATER_THAN","LESS_THAN","EQUAL_TO","NOT_EQUAL_TO","GREATER_THAN_OR_EQUAL_TO","LESS_THAN_OR_EQUAL_TO","PERCENT_DECREASE","PERCENT_INCREASE","INCREASES_BY","DECREASES_BY"],"example":"GREATER_THAN"},"threshold":{"type":"number","description":"The numeric threshold value that triggers the alert. For percentage-based alerts (when isPercentage is true), this represents the percentage value (e.g., 50 for 50%). For absolute value alerts, this is the metric value to compare against","example":100.5},"notificationAddresses":{"type":"array","description":"Email addresses to notify when the alert is triggered. Multiple addresses can be specified. Each address will receive an email notification when the anomaly condition is met","example":["admin@example.com","ops@example.com"],"items":{"type":"string"}},"slackConfigurations":{"type":"array","description":"Slack configuration IDs to notify when the alert is triggered. Each configuration represents a Slack workspace and channel where notifications will be posted","example":["slack-config-id-1","slack-config-id-2"],"items":{"type":"string"}},"description":{"type":["string","null"],"description":"Optional description providing additional context about the alert's purpose and configuration","example":"Monitors total AI costs to prevent budget overruns"},"periodDuration":{"type":["string","null"],"description":"The time period over which the metric is evaluated. For THRESHOLD and RELATIVE_CHANGE alerts, this determines the evaluation window. For CUMULATIVE_USAGE alerts, this determines the accumulation period","enum":["ONE_MINUTE","FIVE_MINUTES","FIFTEEN_MINUTES","THIRTY_MINUTES","ONE_HOUR","TWELVE_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","DAILY","WEEKLY","MONTHLY","QUARTERLY"],"example":"ONE_HOUR"},"enabled":{"type":"boolean","description":"Whether the anomaly alert is active. When false, the alert is disabled without being deleted from the database. Disabled alerts do not evaluate conditions or send notifications","example":true},"filters":{"type":["array","null"],"description":"Filter criteria to limit the scope of anomaly monitoring. Each filter specifies a dimension (e.g., ORGANIZATION, PRODUCT, MODEL), an operator (e.g., IS, CONTAINS), and a value to match. Only metrics matching all filters are evaluated","items":{"$ref":"#/components/schemas/AIAnomalyFilter_Read"}},"webhookConfigurations":{"type":"array","description":"Webhook configuration IDs to notify when the alert is triggered. Each configuration represents a webhook endpoint that will receive a POST request with alert details","example":["webhook-config-id-1"],"items":{"type":"string"}},"firing":{"type":"boolean","description":"Whether the anomaly alert is currently triggered. True indicates the alert condition is currently met and notifications have been sent. This is a read-only field automatically updated by the system","example":false,"readOnly":true},"groupBy":{"type":["string","null"],"description":"The dimension by which to group anomaly monitoring. When specified, separate alerts are evaluated for each unique value of this dimension (e.g., per ORGANIZATION, per MODEL, per PRODUCT)","enum":["ORGANIZATION","CREDENTIAL","PRODUCT","MODEL","PROVIDER","AGENT","SUBSCRIBER","TASK_TYPE","WORKSPACE","API_KEY"],"example":"MODEL"},"triggerAfterPersistsDuration":{"type":["string","null"],"description":"The duration the anomaly condition must persist before triggering the alert. This prevents false positives from transient spikes. If null, the alert triggers immediately when the condition is met","enum":["ONE_MINUTE","FIVE_MINUTES","FIFTEEN_MINUTES","THIRTY_MINUTES","ONE_HOUR","TWELVE_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","DAILY","WEEKLY","MONTHLY","QUARTERLY"],"example":"FIVE_MINUTES"},"isPercentage":{"type":["boolean","null"],"description":"Whether the threshold value represents a percentage. When true, the threshold is interpreted as a percentage value. When false or null, the threshold is an absolute value","example":false},"_links":{"$ref":"#/components/schemas/Links"}},"required":["alertType","enabled","firing","metricType","name","operatorType","periodDuration","teamId","threshold"]},"ChartConfigurationResource_Write":{"type":"object","description":"Complete chart configuration","properties":{"mode":{"type":"string","description":"Chart data mode","enum":["time","aggregate"],"example":"time"},"chartType":{"type":"string","description":"Chart visualization type","enum":["line","bar","column","dual-axis","pie"],"example":"line"},"dateRange":{"type":"string","description":"Preset date range or 'custom'","enum":["1h","8h","24h","7d","30d","90d","180d","365d","custom"],"example":"30d"},"customDateRange":{"oneOf":[{"$ref":"#/components/schemas/CustomDateRangeResource_Write"},{"type":"null"}]},"grain":{"type":["string","null"],"description":"Time granularity for aggregation","enum":["auto","five_minute","hour","day","week","month"],"example":"day"},"primaryMetric":{"$ref":"#/components/schemas/MetricConfigurationResource_Write","description":"Primary metric configuration"},"secondaryMetric":{"oneOf":[{"$ref":"#/components/schemas/MetricConfigurationResource_Write"},{"type":"null"}]},"primaryGroupBy":{"type":["string","null"],"description":"Primary grouping dimension","enum":["none","customer","model","provider","agent","product","task","subscriber","modality","org_unit"],"example":"customer"},"secondaryGroupBy":{"type":["string","null"],"description":"Secondary grouping dimension (dual-axis only)","enum":["none","customer","model","provider","agent","product","task","subscriber","modality","org_unit"],"example":"model"},"filters":{"type":["array","null"],"description":"Data preparation filters","items":{"$ref":"#/components/schemas/DataFilterResource_Write"}},"chartFocus":{"oneOf":[{"$ref":"#/components/schemas/ChartFocusResource_Write"},{"type":"null"}]},"codingAssistantScope":{"type":["string","null"],"description":"Coding-assistant scope for this chart: 'policy' (default; count assistants per the team's api-rate billing policy), 'all' (count every coding assistant), or 'none' (exclude all coding assistants). Null/absent = policy.","enum":["policy","all","none"],"example":"policy"}},"required":["chartType","dateRange","mode","primaryMetric"]},"ChartDefinitionResource_Write":{"type":"object","description":"A saved chart configuration","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"chart_definition","readOnly":true},"label":{"type":"string","description":"The object's label","example":"Monthly Cost by Provider","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"User-defined chart name","example":"Monthly Cost by Provider"},"description":{"type":["string","null"],"description":"Chart description","example":"Track AI costs across different providers with monthly aggregation"},"configuration":{"$ref":"#/components/schemas/ChartConfigurationResource_Write","description":"Complete chart configuration"},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Write"},{"type":"null"}]},"teamId":{"type":"string","description":"The team identifier","writeOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["configuration"]},"ChartFocusResource_Write":{"type":"object","description":"Chart focus configuration","properties":{"method":{"type":"string","description":"Focus method to apply","enum":["all","topN","valueThreshold"],"example":"topN"},"topN":{"oneOf":[{"$ref":"#/components/schemas/TopNConfigurationResource_Write"},{"type":"null"}]},"valueThreshold":{"oneOf":[{"$ref":"#/components/schemas/ValueThresholdConfigurationResource_Write"},{"type":"null"}]}},"required":["method"]},"CustomDateRangeResource_Write":{"type":"object","description":"Custom date range","properties":{"startDate":{"type":"string","description":"Start date (ISO 8601)","example":"2025-08-01T00:00:00Z"},"endDate":{"type":"string","description":"End date (ISO 8601)","example":"2025-08-19T23:59:59Z"}},"required":["endDate","startDate"]},"DataFilterResource_Write":{"type":"object","description":"Data filter","properties":{"field":{"type":"string","description":"Field to filter on","enum":["customer","model","provider","agent","product","task","subscriberEmail","totalCost","errorReason","isStreamed","operationType","environment"],"example":"provider"},"op":{"type":"string","description":"Filter operator","enum":["equals","not_equals","contains","not_contains","starts_with","in","not_in","is_null","is_not_null","greater_than","less_than","between"],"example":"in"},"value":{"type":"null","description":"Filter value (type varies by field)"},"label":{"type":["string","null"],"description":"Display label for the filter","example":"Provider"}},"required":["field","op"]},"MetricConfigurationResource_Write":{"type":"object","description":"Metric configuration","properties":{"baseMetric":{"type":"string","description":"Base metric identifier","enum":["totalCost","requestCount","tokenCount","inputTokens","outputTokens","latency","errorCount","errorRate","imageCount","durationSeconds","characterCount","creditsConsumed"],"example":"totalCost"},"calculationType":{"type":"string","description":"Calculation to apply","enum":["total","average","per-request","per-token","per-entity","median","maximum"],"example":"total"},"entityType":{"type":["string","null"],"description":"Entity type for per-entity calculations","enum":["customer","agent","product","model","provider","task","subscriber"],"example":"customer"}},"required":["baseMetric","calculationType"]},"ThresholdCriteriaResource_Write":{"type":"object","description":"Threshold criteria","properties":{"metric":{"type":"string","description":"Metric to evaluate","enum":["totalCost","requestCount","tokenCount","inputTokens","outputTokens","latency","errorCount","errorRate","imageCount","durationSeconds","characterCount","creditsConsumed"],"example":"totalCost"},"operator":{"type":"string","description":"Comparison operator","enum":["above","below"],"example":"above"},"value":{"type":"number","format":"double","description":"Threshold value","example":50}},"required":["metric","operator","value"]},"TopNConfigurationResource_Write":{"type":"object","description":"Top N configuration","properties":{"count":{"type":"integer","format":"int32","description":"Number of top/bottom results to show","example":10},"direction":{"type":"string","description":"Sort direction","enum":["highest","lowest"],"example":"highest"},"metric":{"type":"string","description":"Metric to sort by","enum":["totalCost","requestCount","tokenCount","inputTokens","outputTokens","latency","errorCount","errorRate","imageCount","durationSeconds","characterCount","creditsConsumed"],"example":"totalCost"},"includeOther":{"type":"boolean","description":"Include 'Other' category for remaining items","example":true}},"required":["count","direction","includeOther","metric"]},"ValueThresholdConfigurationResource_Write":{"type":"object","description":"Value threshold configuration","properties":{"primary":{"$ref":"#/components/schemas/ThresholdCriteriaResource_Write","description":"Primary threshold criteria"},"secondary":{"oneOf":[{"$ref":"#/components/schemas/ThresholdCriteriaResource_Write"},{"type":"null"}]}},"required":["primary"]},"ChartConfigurationResource_Read":{"type":"object","description":"Complete chart configuration","properties":{"mode":{"type":"string","description":"Chart data mode","enum":["time","aggregate"],"example":"time"},"chartType":{"type":"string","description":"Chart visualization type","enum":["line","bar","column","dual-axis","pie"],"example":"line"},"dateRange":{"type":"string","description":"Preset date range or 'custom'","enum":["1h","8h","24h","7d","30d","90d","180d","365d","custom"],"example":"30d"},"customDateRange":{"oneOf":[{"$ref":"#/components/schemas/CustomDateRangeResource_Read"},{"type":"null"}]},"grain":{"type":["string","null"],"description":"Time granularity for aggregation","enum":["auto","five_minute","hour","day","week","month"],"example":"day"},"primaryMetric":{"$ref":"#/components/schemas/MetricConfigurationResource_Read","description":"Primary metric configuration"},"secondaryMetric":{"oneOf":[{"$ref":"#/components/schemas/MetricConfigurationResource_Read"},{"type":"null"}]},"primaryGroupBy":{"type":["string","null"],"description":"Primary grouping dimension","enum":["none","customer","model","provider","agent","product","task","subscriber","modality","org_unit"],"example":"customer"},"secondaryGroupBy":{"type":["string","null"],"description":"Secondary grouping dimension (dual-axis only)","enum":["none","customer","model","provider","agent","product","task","subscriber","modality","org_unit"],"example":"model"},"filters":{"type":["array","null"],"description":"Data preparation filters","items":{"$ref":"#/components/schemas/DataFilterResource_Read"}},"chartFocus":{"oneOf":[{"$ref":"#/components/schemas/ChartFocusResource_Read"},{"type":"null"}]},"codingAssistantScope":{"type":["string","null"],"description":"Coding-assistant scope for this chart: 'policy' (default; count assistants per the team's api-rate billing policy), 'all' (count every coding assistant), or 'none' (exclude all coding assistants). Null/absent = policy.","enum":["policy","all","none"],"example":"policy"}},"required":["chartType","dateRange","mode","primaryMetric"]},"ChartDefinitionResource_Read":{"type":"object","description":"A saved chart configuration","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"chart_definition","readOnly":true},"label":{"type":"string","description":"The object's label","example":"Monthly Cost by Provider","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"User-defined chart name","example":"Monthly Cost by Provider"},"description":{"type":["string","null"],"description":"Chart description","example":"Track AI costs across different providers with monthly aggregation"},"configuration":{"$ref":"#/components/schemas/ChartConfigurationResource_Read","description":"Complete chart configuration"},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"teamId":{"type":"string","description":"The team identifier","writeOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["configuration"]},"ChartFocusResource_Read":{"type":"object","description":"Chart focus configuration","properties":{"method":{"type":"string","description":"Focus method to apply","enum":["all","topN","valueThreshold"],"example":"topN"},"topN":{"oneOf":[{"$ref":"#/components/schemas/TopNConfigurationResource_Read"},{"type":"null"}]},"valueThreshold":{"oneOf":[{"$ref":"#/components/schemas/ValueThresholdConfigurationResource_Read"},{"type":"null"}]}},"required":["method"]},"CustomDateRangeResource_Read":{"type":"object","description":"Custom date range","properties":{"startDate":{"type":"string","description":"Start date (ISO 8601)","example":"2025-08-01T00:00:00Z"},"endDate":{"type":"string","description":"End date (ISO 8601)","example":"2025-08-19T23:59:59Z"}},"required":["endDate","startDate"]},"DataFilterResource_Read":{"type":"object","description":"Data filter","properties":{"field":{"type":"string","description":"Field to filter on","enum":["customer","model","provider","agent","product","task","subscriberEmail","totalCost","errorReason","isStreamed","operationType","environment"],"example":"provider"},"op":{"type":"string","description":"Filter operator","enum":["equals","not_equals","contains","not_contains","starts_with","in","not_in","is_null","is_not_null","greater_than","less_than","between"],"example":"in"},"value":{"type":"null","description":"Filter value (type varies by field)"},"label":{"type":["string","null"],"description":"Display label for the filter","example":"Provider"}},"required":["field","op"]},"MetricConfigurationResource_Read":{"type":"object","description":"Metric configuration","properties":{"baseMetric":{"type":"string","description":"Base metric identifier","enum":["totalCost","requestCount","tokenCount","inputTokens","outputTokens","latency","errorCount","errorRate","imageCount","durationSeconds","characterCount","creditsConsumed"],"example":"totalCost"},"calculationType":{"type":"string","description":"Calculation to apply","enum":["total","average","per-request","per-token","per-entity","median","maximum"],"example":"total"},"entityType":{"type":["string","null"],"description":"Entity type for per-entity calculations","enum":["customer","agent","product","model","provider","task","subscriber"],"example":"customer"}},"required":["baseMetric","calculationType"]},"ThresholdCriteriaResource_Read":{"type":"object","description":"Threshold criteria","properties":{"metric":{"type":"string","description":"Metric to evaluate","enum":["totalCost","requestCount","tokenCount","inputTokens","outputTokens","latency","errorCount","errorRate","imageCount","durationSeconds","characterCount","creditsConsumed"],"example":"totalCost"},"operator":{"type":"string","description":"Comparison operator","enum":["above","below"],"example":"above"},"value":{"type":"number","format":"double","description":"Threshold value","example":50}},"required":["metric","operator","value"]},"TopNConfigurationResource_Read":{"type":"object","description":"Top N configuration","properties":{"count":{"type":"integer","format":"int32","description":"Number of top/bottom results to show","example":10},"direction":{"type":"string","description":"Sort direction","enum":["highest","lowest"],"example":"highest"},"metric":{"type":"string","description":"Metric to sort by","enum":["totalCost","requestCount","tokenCount","inputTokens","outputTokens","latency","errorCount","errorRate","imageCount","durationSeconds","characterCount","creditsConsumed"],"example":"totalCost"},"includeOther":{"type":"boolean","description":"Include 'Other' category for remaining items","example":true}},"required":["count","direction","includeOther","metric"]},"ValueThresholdConfigurationResource_Read":{"type":"object","description":"Value threshold configuration","properties":{"primary":{"$ref":"#/components/schemas/ThresholdCriteriaResource_Read","description":"Primary threshold criteria"},"secondary":{"oneOf":[{"$ref":"#/components/schemas/ThresholdCriteriaResource_Read"},{"type":"null"}]}},"required":["primary"]},"InvoiceManagementResource":{"type":"object","description":"Invoice management configuration for a product that controls automatic invoice resend behavior. Defines how frequently and how many times unpaid invoices should be automatically resent to customers","properties":{"resendPeriod":{"type":"string","description":"The time unit for the invoice resend interval. Determines the frequency at which unpaid invoices are automatically resent","enum":["DAY","MONTH","YEAR","TEST_MINUTE","TEST_MINUTE_WITH_SYNTHETIC_METERING","NONE"],"example":"MONTH"},"resendPeriodCount":{"type":"integer","format":"int64","description":"The number of time periods to wait between invoice resends. For example, 3 with resendPeriod=MONTH means resend every 3 months","example":3},"numberOfResends":{"type":"integer","format":"int64","description":"The maximum number of times to automatically resend an unpaid invoice before stopping. Prevents infinite resend loops","example":3}},"required":["numberOfResends","resendPeriod","resendPeriodCount"]},"PerformanceDefinition":{"type":"object","description":"An API Performance Definition","properties":{"name":{"type":"string","description":"The name of an performance definition","example":"Platinum Tier"},"description":{"type":"string","description":"The description of an performance definition","example":"Platinum Tier"},"maxRequests":{"type":"integer","format":"int32","description":"The maximum amount of requests allowed for the given interval","example":100},"timePeriod":{"type":"integer","format":"int32","description":"The time period","example":2},"timeUnit":{"type":"string","description":"The time unit","enum":["MILLISECONDS","SECONDS","MINUTES","HOURS","DAYS","WEEKS","MONTHS","YEARS"],"example":"MINUTES"}},"required":["description","maxRequests","name","timePeriod","timeUnit"]},"Plan":{"type":"object","description":"Product pricing plan configuration defining billing structure, pricing tiers, metering elements, and subscription terms. Plans support recurring subscriptions with optional trial periods and metered usage","properties":{"type":{"type":"string","description":"The plan type determining the billing model. SUBSCRIPTION represents recurring billing with optional metered usage.","enum":["SUBSCRIPTION"],"example":"SUBSCRIPTION"},"name":{"type":"string","description":"The name of the plan for identification and display purposes","example":"Professional Plan"},"currency":{"type":"string","description":"The currency code for all pricing in this plan","enum":["USD","EUR","CAD","GBP","JPY","CNY","MXN","COP","ARS","ZMW","AUD","ZWG"],"example":"USD"},"period":{"type":["string","null"],"description":"The billing period unit. Defines the recurring billing cycle (e.g., MONTH for monthly billing). Valid values: DAY, MONTH, YEAR, TEST_MINUTE, TEST_MINUTE_WITH_SYNTHETIC_METERING, NONE","enum":["DAY","MONTH","YEAR","TEST_MINUTE","TEST_MINUTE_WITH_SYNTHETIC_METERING","NONE"],"example":"MONTH"},"periodCount":{"type":["integer","null"],"format":"int64","description":"The number of period units between billing cycles. For example, 3 with period=MONTH means billing every 3 months. Must be a positive integer (e.g., 1, 3, 12)","example":1},"trialPeriod":{"type":["string","null"],"description":"The trial period unit for subscription plans","enum":["DAY","MONTH","YEAR","TEST_MINUTE","TEST_MINUTE_WITH_SYNTHETIC_METERING","NONE"],"example":"DAY"},"trialPeriodCount":{"type":["integer","null"],"format":"int64","description":"The number of trial period units before billing begins. For example, 14 with trialPeriod DAY means a 14-day free trial","example":14},"charge":{"type":["number","null"],"description":"The fixed recurring charge amount for subscription plans. This is the base subscription fee charged each billing period","example":99.99},"graduated":{"type":"boolean","description":"Indicates whether volume pricing tiers are graduated (cumulative) or not. When true, each tier applies only to usage within that tier's range. When false, the entire usage is charged at the rate of the highest tier reached","example":true},"prePayAllFlatRates":{"type":["boolean","null"],"description":"Indicates whether subscription flat rate charges should be paid upfront at subscription creation rather than at the end of the first billing period","example":false},"tiers":{"type":["array","null"],"description":"Volume-based pricing tiers that define different rates based on usage levels. Each tier specifies a usage range and corresponding pricing","items":{"$ref":"#/components/schemas/Tier"}},"elements":{"type":["array","null"],"description":"Metering elements that define what is being measured and billed in this plan. Each element specifies a metric, unit price, and optional quotas","items":{"$ref":"#/components/schemas/PlanElement"}},"setupFees":{"type":["array","null"],"description":"One-time setup fees charged when a subscription is created. Each setup fee has a name, amount, and type","items":{"$ref":"#/components/schemas/SetupFee"}},"ratingAggregations":{"type":["array","null"],"description":"Usage aggregation rules that define how metered usage is grouped and calculated for billing purposes. Includes quota limits and overage handling","items":{"$ref":"#/components/schemas/RatingAggregation"}}},"required":["currency","name","type"]},"PlanElement":{"type":"object","description":"Metering element within a pricing plan that defines what is measured and how it is charged. Plan elements specify the metric being tracked, the pricing model (flat rate, per-unit, or tiered), and any specific values to filter on","properties":{"name":{"type":"string","description":"The name of the metering element for identification purposes","example":"Shipping Weight"},"elementDefinitionId":{"type":"string","description":"The unique identifier of the element definition that specifies what metric is being measured (e.g., API calls, data transfer, compute time)","example":"sBcTTs3"},"distinctValue":{"type":["string","null"],"description":"Optional filter value to charge only for specific metric values. For example, if measuring by country, this could be 'FRANCE' to charge only for French traffic. Case insensitive","example":"premium"},"flatAmount":{"type":["number","null"],"description":"Fixed charge amount applied regardless of usage volume. Used for flat-rate pricing models. Mutually exclusive with unitAmount in most pricing strategies","example":99.99},"unitAmount":{"type":["number","null"],"description":"Per-unit charge amount applied to each measured unit. For example, $0.01 per API call or $0.05 per GB transferred. Used for usage-based pricing models","example":0.01},"type":{"type":"string","description":"The metering/aggregation method for this plan element, determining how metric values are counted, summed, or analyzed for billing. This is the plan element's `type` field and is distinct from a rating aggregation's `aggregationType` field. COUNT_DISTINCT_VALUE_BY_NAME and DISTINCT_VALUE_BY_NAME are valid here but are not valid `aggregationType` values.","enum":["DISTINCT_VALUE_BY_NAME","COUNT_DISTINCT_VALUE_BY_NAME","SUM","COUNT","MAXIMUM","AVERAGE","UNIQUE"],"example":"COUNT"}},"required":["elementDefinitionId","name","type"]},"ProductResource":{"type":"object","description":"A Product","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"product","readOnly":true},"label":{"type":"string","description":"The product's label (automatically set to the product name for display purposes)","example":"My Awesome Product","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this product","example":"a91XJp","writeOnly":true},"owner":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"ownerId":{"type":["string","null"],"description":"The unique identifier of the product owner","example":"LjRrbJ","writeOnly":true},"sourceConfiguration":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"sourceConfigurationId":{"type":["string","null"],"description":"The source configuration ID","example":"af75417c71d24e708f506596ce5ab675","writeOnly":true},"sources":{"type":["array","null"],"description":"The sources associated with the product","items":{"$ref":"#/components/schemas/ResourceMetadata"},"readOnly":true},"sourceIds":{"type":["array","null"],"description":"The source IDs associated with the product","example":["af75417c71d24e708f506596ce5ab675","bf86528d82e54f1a7df96ca7de747786"],"items":{"type":"string"},"writeOnly":true},"environment":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"environmentId":{"type":["string","null"],"description":"The environment id","example":"af75417c71d24e708f506596ce5ab675","writeOnly":true},"name":{"type":"string","description":"The name of the product","example":"my-awesome-product"},"version":{"type":"string","description":"The version of the product following semantic versioning (MAJOR.MINOR.PATCH). When creating a product, specify the initial version (e.g., '1.0.0'). When updating a product, the API automatically increments the version based on internal versioning rules. You can specify a version in the update request, but the API may override it","example":"1.0.0"},"externalLabel":{"type":["string","null"],"description":"An external label for the product that is exposed in developer portals","example":"An Awesome Product"},"plan":{"oneOf":[{"$ref":"#/components/schemas/Plan"},{"type":"null"}]},"portalLabel":{"type":["string","null"],"description":"An external label for the product that is exposed in developer portals","example":"Product Name"},"externalId":{"type":["string","null"],"description":"An external identifier (ie, in a api management system) that is associated with the Product","example":"12345abcd"},"portalId":{"type":["string","null"],"description":"An external id for the product that is exposed in developer portals","example":"Product Name"},"description":{"type":["string","null"],"description":"The description of the product","example":"Truly an awesome product"},"descriptionAsHTML":{"type":["string","null"],"description":"The description of the product (HTML formatted)","example":"<b>Truly an awesome product</b>"},"shortDescription":{"type":["string","null"],"description":"A short description of the product","example":"Truly an awesome product"},"shortDescriptionAsHTML":{"type":["string","null"],"description":"The short description of the product (HTML formatted)","example":"<b>Truly an awesome product</b>"},"published":{"type":["boolean","null"],"description":"Whether or not the product is published to a developer portal","example":true},"preview":{"type":["boolean","null"],"description":"Whether or not the product is in preview mode in a developer portal","example":false},"audienceRestriction":{"type":["string","null"],"description":"The audience restriction, if any, on a product","enum":["USER","ORGANIZATION"],"example":"USER"},"code":{"type":["string","null"],"description":"The product code","example":"dkfjsl-1234"},"notifyClientOnInvoice":{"type":["boolean","null"],"description":"Notify client when an invoice is generated for this product"},"notificationAddressesOnInvoice":{"type":["array","null"],"description":"A list of email addresses to notify when an invoice is generated for this product","example":["billing@example.com","finance@example.com"],"items":{"type":"string"}},"logo":{"type":["string","null"],"description":"The product's logo","readOnly":true},"logoByteArray":{"type":["string","null"],"format":"byte","description":"The product's logo as a byte array"},"apimGroupId":{"type":["string","null"],"description":"An external API group identifier (ie, in a API management system) that is associated with the Product","example":"apim-group-1234"},"pricingDescription":{"type":["string","null"],"description":"The pricing description","example":"Pay as you go pricing based on API calls"},"pricingDescriptionAsHTML":{"type":["string","null"],"description":"The pricing description (HTML formatted)","example":"<p>Pay as you go pricing based on <b>API calls</b></p>"},"tags":{"type":["array","null"],"description":"A list of tags associated with this product. Optional field - can be omitted entirely, provided as empty array [], or contain tag values","example":["tag1","tag2","tag3"],"items":{"type":"string"}},"terms":{"type":["array","null"],"description":"Terms and conditions associated with this product.","items":{"$ref":"#/components/schemas/Terms"}},"invoiceManagement":{"oneOf":[{"$ref":"#/components/schemas/InvoiceManagementResource"},{"type":"null"}]},"paymentSource":{"type":["string","null"],"description":"The product payment source","enum":["EXTERNAL_PAYMENT_NOTIFICATION","PAYMENT_VIA_PAYMENT_PROVIDER","INVOICE_ONLY_NO_PAYMENT"],"example":"PAYMENT_VIA_PAYMENT_PROVIDER"},"comingSoon":{"type":"boolean","description":"Whether to display the coming soon ribbon"},"comingSoonText":{"type":["string","null"],"description":"The text to display in the coming soon ribbon","example":"Coming Soon!"},"meteringModels":{"type":["array","null"],"description":"The metering models associated with the product. Optional field - can be omitted entirely, provided as empty array [], or contain model values","example":["TRANSACTIONAL"],"items":{"type":"string","enum":["TRANSACTIONAL","RESOURCE"]}},"notifyClientTrialAboutToExpire":{"type":["boolean","null"],"description":"Whether to notify the client when the trial is about to expire"},"paymentConfigurationId":{"type":["string","null"],"description":"The payment configuration ID associated with the product","example":"dka2dk2"},"tierQuotaNotificationThreshold":{"type":["number","null"],"format":"double","description":"The threshold Percentage for tier quota notifications","example":80},"displayPriority":{"type":["number","null"],"format":"double","description":"The displayPriority of the product","example":13},"apimConfigurationId":{"type":["string","null"],"description":"The Anypoint configuration ID associated with the product","example":"dka2dk2"},"performanceDefinition":{"oneOf":[{"$ref":"#/components/schemas/PerformanceDefinition"},{"type":"null"}]},"syncedToGateway":{"type":["boolean","null"],"description":"Whether or not the product is synchronized with an API Gateway","example":true,"readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["name","ownerId","plan","teamId","version"]},"RatingAggregation":{"type":"object","description":"Usage-based pricing configuration that defines how metered data is aggregated and billed. Rating aggregations enable complex pricing models by specifying what metric to measure, how to calculate it, and what pricing tiers to apply based on usage levels","properties":{"id":{"type":["string","null"],"description":"The unique identifier of the rating aggregation","example":"l3kR6l","readOnly":true},"name":{"type":"string","description":"The name of the rating aggregation for identification and display purposes","example":"API Calls by Region"},"elementDefinitionId":{"type":"string","description":"The identifier of the element definition that specifies which metric to aggregate. References an ElementDefinition that defines the data field to measure","example":"3By6OgB"},"graduated":{"type":["boolean","null"],"description":"Determines the tier pricing model. When true, uses graduated pricing where each tier's rate applies only to usage within that tier's range. When false, uses volume pricing where the entire usage is charged at the rate of the highest tier reached","example":true},"distinctValue":{"type":["string","null"],"description":"Optional filter value for distinct-value-based aggregations. When specified, only metrics matching this value (case insensitive) are included in the aggregation. For example, 'FRANCE' to aggregate only transactions where the metering element was sent with the value 'FRANCE' to aggregate French transactions.","example":"PREMIUM"},"aggregationType":{"type":"string","description":"The method used to calculate the aggregated value from the metered data. To count distinct values (for example, unique regions or customer IDs), use DISTINCT. This is separate from a plan element's `type` field: values like COUNT_DISTINCT_VALUE_BY_NAME and DISTINCT_VALUE_BY_NAME belong to the plan element `type` field, not to aggregationType.","enum":["SUM","COUNT","MAXIMUM","AVERAGE","UNIQUE","DISTINCT","LAST_RECEIVED"],"example":"SUM"},"tiers":{"type":["array","null"],"description":"Volume-based pricing tiers that define different rates based on usage levels. Each tier specifies a usage range and corresponding pricing.","items":{"$ref":"#/components/schemas/Tier"}}},"required":["aggregationType","elementDefinitionId","name"]},"SetupFee":{"type":"object","description":"One-time setup fee charged when a subscription is created or an organization is onboarded. Setup fees can be applied at the organization level or per-subscription level","properties":{"id":{"type":["string","null"],"description":"The unique identifier of the setup fee","example":"Rl41jE","readOnly":true},"name":{"type":"string","description":"The name of the setup fee for identification and display on invoices","example":"Onboarding Fee"},"type":{"type":"string","description":"The scope at which the setup fee is applied. ORGANIZATION applies the fee once per organization, SUBSCRIPTION applies the fee for each new subscription","enum":["ORGANIZATION","SUBSCRIPTION"],"example":"SUBSCRIPTION"},"flatAmount":{"type":["number","null"],"description":"The fixed amount charged for this setup fee","example":499}},"required":["name","type"]},"Terms":{"type":"object","description":"Terms and conditions document associated with a product. Defines legal terms, service agreements, or usage policies that customers must accept when subscribing to or purchasing a product","properties":{"link":{"type":"string","description":"URL or reference link to the full terms and conditions document. Can be an external URL or internal document identifier","example":"https://example.com/terms/standard-tos.pdf"},"terms":{"type":"string","description":"The full text or summary of the terms and conditions. Can contain the complete legal text or a brief description with a link to the full document","example":"By using this service, you agree to our standard terms of service including data usage policies and service level agreements"},"order":{"type":"integer","format":"int32","description":"Display order for multiple terms documents. Lower numbers appear first. Used when a product has multiple terms documents that should be presented in a specific sequence","example":1}},"required":["link","order","terms"]},"Tier":{"type":"object","description":"Volume-based pricing tier that defines different rates based on usage levels. Tiers enable graduated or volume pricing where the rate changes as usage increases. Each tier specifies a usage range and corresponding pricing. Tiers are primarily used within RatingAggregation for modern usage-based billing. They also appear in PeriodChargeResource to show which tier was applied to a specific charge","properties":{"id":{"type":["string","null"],"description":"The unique identifier of the pricing tier","example":"af75417c71d24e708f506596ce5ab675","readOnly":true},"name":{"type":"string","description":"The name of the pricing tier for identification and display purposes","example":"First 1000 units"},"startingFrom":{"type":["number","null"],"description":"The lower bound of the usage range for this tier (inclusive). For example, 0 for the first tier, 1000 for the second tier. If null, starts from 0","example":1000},"upTo":{"type":["number","null"],"description":"The upper bound of the usage range for this tier (exclusive). For example, 1000 means this tier applies up to but not including 1000 units. If null, this tier has no upper limit","example":5000},"unitAmount":{"type":["number","null"],"description":"The per-unit price for usage within this tier. For example, $0.10 per API call for the first 1000 calls. Used for usage-based pricing","example":0.1},"flatAmount":{"type":["number","null"],"description":"A fixed charge applied when usage reaches this tier. For example, a $100 base fee for the 1000-5000 unit tier. Can be combined with unitAmount","example":100}},"required":["name"]},"OrganizationResource":{"type":"object","description":"organization","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"organization","readOnly":true},"label":{"type":"string","description":"The object's label","example":"Weyland-Yutani Corporation","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the organization","example":"Weyland-Yutani Corporation"},"externalId":{"type":["string","null"],"description":"The organization's external id","example":"WY-1234"},"logo":{"type":["string","null"],"description":"The organization's logo","example":"https://www.example.com/logo.png"},"address1":{"type":["string","null"],"description":"The organization's address 1","example":"Main St."},"address2":{"type":["string","null"],"description":"The organization's address 2","example":"Suite 100"},"city":{"type":["string","null"],"description":"The organization's city address","example":"Brooklyn"},"state":{"type":["string","null"],"description":"The organization's state address","example":"NY"},"country":{"type":["string","null"],"description":"The organization's country","example":"USA"},"postalCode":{"type":["string","null"],"description":"The organization's postal code","example":"11201"},"billingPhoneNumber":{"type":["string","null"],"description":"The organization's billing phone number","example":"555-555-5555"},"phoneNumber":{"type":["string","null"],"description":"The organization's phone number","example":"555-555-5555"},"emailAddress":{"type":["string","null"],"description":"The organization's contact email address","example":"contact@weyland-yutani.com"},"remittanceInstructions":{"type":["string","null"],"description":"The organization's remittance instructions","example":"Please remit payment to the address above"},"url":{"type":["string","null"],"description":"The organization's website URL","example":"https://www.weyland-yutani.com"},"currency":{"type":["string","null"],"description":"The organization's currency","enum":["USD","EUR","CAD","GBP","JPY","CNY","MXN","COP","ARS","ZMW","AUD","ZWG"],"example":"USD"},"metadata":{"type":["string","null"],"description":"The organization's metadata (in key / value pairs)","example":"{'key1': 'value1', 'key2': 'value2'}"},"domainAliases":{"type":["array","null"],"description":"The organization's domain aliases","example":["weyland-yutani.com","wy-corp.com"],"items":{"type":"string"}},"types":{"type":["array","null"],"description":"The organization type (array with single value). Use CONSUMER for organizations (end customers who consume APIs and accumulate usage costs). Note: MANAGING is used by team endpoints (see /v2/api/teams) and should not be used when creating organizations.","example":["CONSUMER"],"items":{"type":"string","enum":["CONSUMER"]}},"tenant":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"tenantId":{"type":["string","null"],"description":"The unique identifier of the tenant that owns this organization. Required to associate the organization with a tenant. Format: Revenium hashid (URL-safe encoded string).","example":"6PV0xe","writeOnly":true},"parent":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"parentId":{"type":["string","null"],"description":"Optional. Omit this field when creating a top-level organization. To create a nested organization, set parentId to an existing organization ID (retrieve IDs using GET /v2/api/organizations?tenantId={tenantId}). Format: Revenium hashid (URL-safe encoded string).","example":"6PV0xe","writeOnly":true},"sourceAutoDiscoveryEnabled":{"type":["boolean","null"],"description":"Whether automatic discovery of API sources is enabled for this organization","example":true},"elementDefinitionAutoDiscoveryEnabled":{"type":["boolean","null"],"description":"Whether automatic discovery of metering element definitions is enabled for this organization","example":true},"billingEmail":{"type":["string","null"],"description":"The email address for billing-related communications","example":"billing@weyland-yutani.com"},"callCountElementDefinition":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["name","tenant","tenantId"]},"OrganizationResource_Read":{"type":"object","description":"organization","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"organization","readOnly":true},"label":{"type":"string","description":"The object's label","example":"Weyland-Yutani Corporation","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the organization","example":"Weyland-Yutani Corporation"},"externalId":{"type":["string","null"],"description":"The organization's external id","example":"WY-1234"},"logo":{"type":["string","null"],"description":"The organization's logo","example":"https://www.example.com/logo.png"},"address1":{"type":["string","null"],"description":"The organization's address 1","example":"Main St."},"address2":{"type":["string","null"],"description":"The organization's address 2","example":"Suite 100"},"city":{"type":["string","null"],"description":"The organization's city address","example":"Brooklyn"},"state":{"type":["string","null"],"description":"The organization's state address","example":"NY"},"country":{"type":["string","null"],"description":"The organization's country","example":"USA"},"postalCode":{"type":["string","null"],"description":"The organization's postal code","example":"11201"},"billingPhoneNumber":{"type":["string","null"],"description":"The organization's billing phone number","example":"555-555-5555"},"phoneNumber":{"type":["string","null"],"description":"The organization's phone number","example":"555-555-5555"},"emailAddress":{"type":["string","null"],"description":"The organization's contact email address","example":"contact@weyland-yutani.com"},"remittanceInstructions":{"type":["string","null"],"description":"The organization's remittance instructions","example":"Please remit payment to the address above"},"url":{"type":["string","null"],"description":"The organization's website URL","example":"https://www.weyland-yutani.com"},"currency":{"type":["string","null"],"description":"The organization's currency","enum":["USD","EUR","CAD","GBP","JPY","CNY","MXN","COP","ARS","ZMW","AUD","ZWG"],"example":"USD"},"metadata":{"type":["string","null"],"description":"The organization's metadata (in key / value pairs)","example":"{'key1': 'value1', 'key2': 'value2'}"},"domainAliases":{"type":["array","null"],"description":"The organization's domain aliases","example":["weyland-yutani.com","wy-corp.com"],"items":{"type":"string"}},"types":{"type":["array","null"],"description":"The organization type (array with single value). Use CONSUMER for organizations (end customers who consume APIs and accumulate usage costs). Note: MANAGING is used by team endpoints (see /v2/api/teams) and should not be used when creating organizations.","example":["CONSUMER"],"items":{"type":"string","enum":["CONSUMER"]}},"tenant":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"tenantId":{"type":["string","null"],"description":"The unique identifier of the tenant that owns this organization. Required to associate the organization with a tenant. Format: Revenium hashid (URL-safe encoded string).","example":"6PV0xe","writeOnly":true},"parent":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"parentId":{"type":["string","null"],"description":"Optional. Omit this field when creating a top-level organization. To create a nested organization, set parentId to an existing organization ID (retrieve IDs using GET /v2/api/organizations?tenantId={tenantId}). Format: Revenium hashid (URL-safe encoded string).","example":"6PV0xe","writeOnly":true},"sourceAutoDiscoveryEnabled":{"type":["boolean","null"],"description":"Whether automatic discovery of API sources is enabled for this organization","example":true},"elementDefinitionAutoDiscoveryEnabled":{"type":["boolean","null"],"description":"Whether automatic discovery of metering element definitions is enabled for this organization","example":true},"billingEmail":{"type":["string","null"],"description":"The email address for billing-related communications","example":"billing@weyland-yutani.com"},"callCountElementDefinition":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["name","tenant","tenantId"]},"AssignPrimaryRequest_Read":{"type":"object","description":"Request to set a person's primary org-unit assignment (recorded as a MANUAL assignment)","properties":{"orgUnitId":{"type":"integer","format":"int64","description":"Target org unit id","example":173}}},"PrimaryAssignmentResponse_Read":{"type":"object","description":"A directory person's currently-open primary org-unit assignment","properties":{"personId":{"type":"integer","format":"int64","description":"DirectoryPerson id","example":97},"personEmail":{"type":["string","null"],"description":"The person's primary email, when known","example":"ash@weyland-yutani.io"},"orgUnitId":{"type":"integer","format":"int64","description":"Assigned org unit id","example":173},"orgUnitName":{"type":"string","description":"Assigned org unit name","example":"Payments"},"orgUnitPath":{"type":"string","description":"Materialized ancestor-id path of the assigned unit, including self","example":"/12/40/173/"},"validFrom":{"type":"string","format":"date-time","description":"When this assignment became effective","example":"2024-01-15T10:30:00Z"},"assignmentSource":{"type":"string","description":"How the assignment was made","enum":["SYNCED","MANUAL","CSV"],"example":"MANUAL"}}},"AssignPrimaryByEmailRequest_Read":{"type":"object","description":"Request to set a primary org-unit assignment by subscriber email (recorded as a MANUAL assignment). The email is resolved to a directory person — created if missing — via the same deterministic bridge the CSV import uses.","properties":{"email":{"type":"string","description":"Subscriber email address","example":"ash@weyland-yutani.io"},"orgUnitId":{"type":"integer","format":"int64","description":"Target org unit id","example":173}}},"MeteringElementDefinitionResource_Write":{"type":"object","description":"metering-element-definition","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"metering_element_definition","readOnly":true},"label":{"type":"string","description":"The metering element's label (automatically set to the element name for display purposes)","example":"country","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the metering element definition","example":"definition one"},"description":{"type":["string","null"],"description":"The description of the metering element definition","example":"description one"},"type":{"type":"string","description":"The type of the metering element definition","enum":["STRING","NUMBER"],"example":"NUMBER"},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Write"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this metering element definition","example":"a91XJp","writeOnly":true},"isSystem":{"type":"boolean","description":"Indicates whether this is a system-provided metering element that cannot be deleted","example":false,"readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["name","teamId","type"]},"MeteringElementDefinitionResource_Read":{"type":"object","description":"metering-element-definition","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"metering_element_definition","readOnly":true},"label":{"type":"string","description":"The metering element's label (automatically set to the element name for display purposes)","example":"country","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the metering element definition","example":"definition one"},"description":{"type":["string","null"],"description":"The description of the metering element definition","example":"description one"},"type":{"type":"string","description":"The type of the metering element definition","enum":["STRING","NUMBER"],"example":"NUMBER"},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this metering element definition","example":"a91XJp","writeOnly":true},"isSystem":{"type":"boolean","description":"Indicates whether this is a system-provided metering element that cannot be deleted","example":false,"readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["name","teamId","type"]},"CredentialResource":{"type":"object","description":"credential","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"credential","readOnly":true},"label":{"type":"string","description":"The credential's label (automatically set to the application name for display purposes)","example":"my-awesome-credential","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the credential","example":"Invoice API Credential (Staging)"},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this credential","example":"a91XJp","writeOnly":true},"organization":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"organizationId":{"type":["string","null"],"description":"The unique identifier of the organization that owns this credential","example":"6PV0xe","writeOnly":true},"subscriber":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"subscriberId":{"type":["string","null"],"description":"The unique identifier of the subscriber who owns this credential","example":"pEjxgX","writeOnly":true},"externalId":{"type":"string","description":"The external id of the credential","example":"d91450df5a74492cb5fa0ccadec26987"},"externalSecret":{"type":["string","null"],"description":"The external secret of the credential","example":"aklda93#Ax_As!@3414a"},"subscriptions":{"type":["array","null"],"description":"The subscriptions associated with this credential","items":{"$ref":"#/components/schemas/ResourceMetadata"},"readOnly":true},"subscriptionIds":{"type":["array","null"],"description":"The subscription IDs associated with this credential","example":["sub-id-1","sub-id-2"],"items":{"type":"string"},"writeOnly":true},"tags":{"type":["array","null"],"description":"A list of tags associated with this credential. ","example":["tag1","tag2","tag3"],"items":{"type":"string"}},"identityProvider":{"type":["string","null"],"description":"The name of the identity provider","example":"Auth0"},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["externalId","name","organizationId","subscriberId","teamId"]},"CredentialResource_Write":{"type":"object","description":"credential","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"credential","readOnly":true},"label":{"type":"string","description":"The credential's label (automatically set to the application name for display purposes)","example":"my-awesome-credential","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the credential","example":"Invoice API Credential (Staging)"},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Write"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this credential","example":"a91XJp","writeOnly":true},"organization":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Write"},{"type":"null"}]},"organizationId":{"type":["string","null"],"description":"The unique identifier of the organization that owns this credential","example":"6PV0xe","writeOnly":true},"subscriber":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Write"},{"type":"null"}]},"subscriberId":{"type":["string","null"],"description":"The unique identifier of the subscriber who owns this credential","example":"pEjxgX","writeOnly":true},"externalId":{"type":"string","description":"The external id of the credential","example":"d91450df5a74492cb5fa0ccadec26987"},"externalSecret":{"type":["string","null"],"description":"The external secret of the credential","example":"aklda93#Ax_As!@3414a"},"subscriptions":{"type":["array","null"],"description":"The subscriptions associated with this credential","items":{"$ref":"#/components/schemas/ResourceMetadata_Write"},"readOnly":true},"subscriptionIds":{"type":["array","null"],"description":"The subscription IDs associated with this credential","example":["sub-id-1","sub-id-2"],"items":{"type":"string"},"writeOnly":true},"tags":{"type":["array","null"],"description":"A list of tags associated with this credential. ","example":["tag1","tag2","tag3"],"items":{"type":"string"}},"identityProvider":{"type":["string","null"],"description":"The name of the identity provider","example":"Auth0"},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["externalId","name","organizationId","subscriberId","teamId"]},"CodingAssistantSubscriptionRequest_Read":{"type":"object","description":"Request body for creating or updating a coding assistant subscription","properties":{"provider":{"type":"string","description":"AI provider identifier","enum":["claude-code","gemini-cli","cursor","codex-cli","github-copilot"],"example":"claude-code"},"extraUsageEnabled":{"type":"boolean","description":"Whether usage beyond the seat allocation is permitted","example":false},"tiers":{"type":["array","null"],"description":"Tier-based seat allocations (null if not using tiered pricing)","items":{"$ref":"#/components/schemas/TierAllocation_Read"}}}},"TierAllocation_Read":{"type":"object","description":"Allocation of seats and cost for a specific subscription tier","properties":{"tier":{"type":"string","description":"Subscription tier name","example":"pro"},"seats":{"type":"integer","format":"int32","description":"Number of seats allocated to this tier","example":10},"perSeatCost":{"type":"number","description":"Cost per seat in USD for this tier","example":19}}},"EntityModelCodingAssistantSubscriptionResponse_Read":{"type":"object","properties":{"organizationId":{"type":"string","description":"Encoded organization ID","example":"abc123"},"provider":{"type":"string","description":"AI provider identifier","example":"claude-code"},"extraUsageEnabled":{"type":"boolean","description":"Whether usage beyond the seat allocation is permitted","example":false},"tiers":{"type":["array","null"],"description":"Tier-based seat allocations (null if not using tiered pricing)","items":{"$ref":"#/components/schemas/TierAllocation_Read"}},"_links":{"$ref":"#/components/schemas/Links"}}},"AgentResource_Write":{"type":"object","description":"An AI agent registered for an organization","properties":{"id":{"type":"string","description":"The unique identifier of the agent","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"agent","readOnly":true},"label":{"type":"string","description":"The agent's display name","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"telemetryKey":{"type":["string","null"],"description":"The exact string sent in the `agent` field of telemetry. Matched case-insensitively and unique per organization. Immutable after creation","example":"marketing-agent"},"displayName":{"type":["string","null"],"description":"Human-readable name for the agent. Defaults to the telemetry key when omitted","example":"Marketing Agent"},"source":{"type":["string","null"],"description":"How the agent record was created","enum":["TELEMETRY","UI","API"],"example":"API","readOnly":true},"owner":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Write"},{"type":"null"}]},"ownerId":{"type":["string","null"],"description":"The unique identifier of the user who owns this agent. Omit to leave the owner unchanged on update; a set owner cannot be cleared","example":"af75417c71d24e708f506596ce5ab675","writeOnly":true},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Write"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The team identifier. Required when creating an agent. Immutable after creation","writeOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["telemetryKey"]},"AgentResource_Read":{"type":"object","description":"An AI agent registered for an organization","properties":{"id":{"type":"string","description":"The unique identifier of the agent","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"agent","readOnly":true},"label":{"type":"string","description":"The agent's display name","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"telemetryKey":{"type":["string","null"],"description":"The exact string sent in the `agent` field of telemetry. Matched case-insensitively and unique per organization. Immutable after creation","example":"marketing-agent"},"displayName":{"type":["string","null"],"description":"Human-readable name for the agent. Defaults to the telemetry key when omitted","example":"Marketing Agent"},"source":{"type":["string","null"],"description":"How the agent record was created","enum":["TELEMETRY","UI","API"],"example":"API","readOnly":true},"owner":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"ownerId":{"type":["string","null"],"description":"The unique identifier of the user who owns this agent. Omit to leave the owner unchanged on update; a set owner cannot be cleared","example":"af75417c71d24e708f506596ce5ab675","writeOnly":true},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The team identifier. Required when creating an agent. Immutable after creation","writeOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["telemetryKey"]},"TeamMetadata":{"type":"object","description":"Metadata of a team resource with logo","properties":{"id":{"type":"string","description":"The id of the team","example":"JMwX9g4","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"team","readOnly":true},"label":{"type":"string","description":"The team's name","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"logo":{"type":["string","null"],"description":"The team's logo URL","example":"https://cdn.revenium.io/logos/team-logo.png","readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}}},"UserResource":{"type":"object","description":"user","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"user","readOnly":true},"label":{"type":"string","description":"The user's label (automatically set to the email address for display purposes)","example":"ash@weyland-yutani.io","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"email":{"type":"string","description":"The email address of the user","example":"ash@weyland-yutani.io"},"firstName":{"type":["string","null"],"description":"The first name of the user","example":"Ash"},"lastName":{"type":["string","null"],"description":"The last name of the user","example":"Williams"},"phoneNumber":{"type":["string","null"],"description":"The phone number associated with the user","example":"001-718-555-5555"},"homepagePreference":{"type":["string","null"],"description":"The user's homepage preference","enum":["PRODUCTS","CUSTOMERS","INVOICES","REVENUE_DASHBOARD","PRODUCT_ANALYTICS","HISTORICAL_USAGE","API_ANALYTICS","ANALYTICS_LOGS","PRODUCT_LOGS","SYSTEM_LOGS","SUBSCRIPTIONS"],"example":"PRODUCTS"},"persona":{"type":["string","null"],"description":"The user's role-based UI persona (cxo_finance, product_leaders or platform_engineering)","enum":["cxo_finance","product_leaders","platform_engineering"],"example":"cxo_finance"},"roles":{"type":"array","description":"The roles of the user","example":["ROLE_API_CONSUMER"],"items":{"type":"string"}},"tenant":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"tenantId":{"type":["string","null"],"description":"The ID of the tenant","example":"pEjxgX","readOnly":true},"teams":{"type":["array","null"],"description":"The teams the user belongs to","items":{"$ref":"#/components/schemas/TeamMetadata"},"readOnly":true},"teamIds":{"type":"array","description":"The IDs of the teams the user belongs to","example":["a91XJp"],"items":{"type":"string"},"writeOnly":true},"defaultTeamId":{"type":["string","null"],"description":"The ID of the default team/organization to load on login","example":"a91XJp"},"primaryUser":{"type":["boolean","null"],"description":"is this the primaryUser in the tenant","example":false},"subscriberId":{"type":["string","null"],"description":"The ID of the subscriber","example":"pEjxgX","readOnly":true},"redirectUrl":{"type":["string","null"],"description":"The URL to use for the magic link invitation email. If not provided, uses the platform default URL.","example":"http://localhost:8081","writeOnly":true},"scheduledForDeletionAt":{"type":["string","null"],"description":"The date when the account is scheduled for permanent deletion (ISO 8601 format). Null if not scheduled for deletion.","example":"2025-01-23T00:00:00Z","readOnly":true},"canViewPromptData":{"type":["boolean","null"],"description":"Whether the user can view captured prompt data (system prompts, messages, and responses). This flag only affects non-admin users; Tenant Administrators have implicit access regardless of this setting. Only modifiable by Tenant Administrators.","example":false},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["email","roles"]},"DenyJoinRequestRequest":{"type":"object","description":"Optional internal note explaining the denial. Omit to record no reason.","example":{"resolutionNote":"Not a recognized employee"},"properties":{"resolutionNote":{"type":["string","null"],"description":"Optional internal note explaining the denial (e.g. \"not an employee\"). Never shown to the requester.","example":"Not a recognized employee","writeOnly":true}}},"TenantJoinRequestResource":{"type":"object","description":"A requester's pending or resolved request to join an existing workspace","properties":{"id":{"type":"string","description":"The id of the object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"tenant-join-request","readOnly":true},"label":{"type":"string","description":"The requester's email address (also used as the display label)","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"emailAddress":{"type":"string","description":"The requester's verified email address","example":"jane@acme.com","readOnly":true},"domain":{"type":"string","description":"The email domain that matched an existing workspace","example":"acme.com","readOnly":true},"status":{"type":"string","description":"Current state of the request","enum":["PENDING","APPROVED","DENIED","WITHDRAWN","EXPIRED","PROCEEDED_SOLO"],"example":"PENDING","readOnly":true},"requestedAt":{"type":["string","null"],"description":"When the request was created (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"expiresAt":{"type":["string","null"],"description":"When a PENDING request lapses (ISO 8601 extended date-time format)","example":"2024-09-08T00:00:00Z","readOnly":true},"resolvedAt":{"type":["string","null"],"description":"When the request left PENDING (ISO 8601 extended date-time format), if resolved","example":"2024-09-02T00:00:00Z","readOnly":true},"resolvedByEmail":{"type":["string","null"],"description":"Email address of the admin who approved/denied the request, if resolved by an admin","example":"admin@acme.com","readOnly":true},"grantedRole":{"type":["string","null"],"description":"The role granted to the approved member at approval time, if approved","example":"ROLE_READ_ONLY","readOnly":true},"resolutionNote":{"type":["string","null"],"description":"Optional internal note recorded when the request was denied","example":"Not a recognized employee","readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}}},"ApproveJoinRequestRequest":{"type":"object","description":"The role to grant the approved member. Omit for the least-privilege default.","properties":{"role":{"type":["string","null"],"description":"The role to grant the approved member. Defaults to the least-privilege ROLE_READ_ONLY when omitted or blank.","enum":["ROLE_READ_ONLY","ROLE_ORG_ADMIN","ROLE_TENANT_ADMIN"],"example":"ROLE_READ_ONLY","writeOnly":true}}},"RatingAggregationQuota_Read":{"type":"object","description":"Quota tracking for a rating aggregation that monitors usage consumption against defined limits. Tracks both total quota consumed and per-tier quota consumption for tiered pricing models","properties":{"ratingAggregationId":{"type":["string","null"],"description":"The unique identifier of the rating aggregation being tracked","example":"l3kR6l","readOnly":true},"ratingAggregationName":{"type":["string","null"],"description":"The name of the rating aggregation for display purposes","example":"API Calls by Region","readOnly":true},"ratingAggregationDistinctValue":{"type":["string","null"],"description":"The rating aggregation Distinct Value","example":"region","readOnly":true},"ratingAggregationType":{"type":["string","null"],"description":"The rating aggregation Type","enum":["SUM","COUNT","MAXIMUM","AVERAGE","UNIQUE","DISTINCT","LAST_RECEIVED"],"example":"SUM","readOnly":true},"elementDefinitionId":{"type":["string","null"],"description":"The identifier of the element definition that specifies which metric is being tracked","example":"3By6OgB","readOnly":true},"elementDefinitionName":{"type":["string","null"],"description":"The name of the element definition for display purposes","example":"API Request Count","readOnly":true},"elementDefinitionDescription":{"type":["string","null"],"description":"The description of the element definition explaining what metric is being measured","example":"Total number of API requests made to the service","readOnly":true},"totalQuotaConsumed":{"type":["number","null"],"description":"The total amount of quota consumed across all tiers. Represents the cumulative usage for this rating aggregation","example":15750.5,"readOnly":true},"tierQuotas":{"type":["array","null"],"description":"Quota consumption breakdown by pricing tier. Shows how much quota was consumed within each tier's usage range","items":{"$ref":"#/components/schemas/TierQuota_Read"},"readOnly":true}}},"SubscriptionResource_Read":{"type":"object","description":"A Subscription. Use subscriberEmail as the primary subscriber email field. The deprecated clientEmailAddress field remains accepted as an alias for compatibility.","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"subscription","readOnly":true},"label":{"type":"string","description":"The subscription's label (automatically set to the client's email address for display purposes)","example":"client@example.com","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the subscription","example":"my-awesome-subscription"},"owner":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"ownerId":{"type":["string","null"],"description":"The unique identifier of the subscription owner","example":"LjRrbJ","writeOnly":true},"client":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscriberEmail":{"type":["string","null"],"description":"The subscription subscriber email address. Required for create unless the deprecated clientEmailAddress alias is provided.","example":"subscriber@example.com"},"clientEmailAddress":{"type":["string","null"],"deprecated":true,"description":"Deprecated alias for subscriberEmail.","example":"subscriber@example.com"},"organization":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"organizationId":{"type":["string","null"],"description":"The organization id (set to UNCLASSIFIED if null)","example":"6PV0xe","writeOnly":true},"account":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"accountId":{"type":["string","null"],"description":"The account id","example":"af75417c71d24e708f506596ce5ab675","writeOnly":true},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this subscription","example":"a91XJp","writeOnly":true},"product":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"productId":{"type":["string","null"],"description":"The product associated with the subscription","example":"af75417c71d24e708f506596ce5ab675","writeOnly":true},"credentials":{"type":["array","null"],"description":"The credentials associated with the product","items":{"$ref":"#/components/schemas/ResourceMetadata_Read"},"readOnly":true},"provisionedCredentialExternalId":{"type":["string","null"],"description":"The real externalId of the credential auto-provisioned by this create call (includeRelatedResources=true). Shown ONCE, in the create response only — credential read endpoints mask externalId, so this is the only place the generated value is obtainable. Use it as the `subscriberCredential` metering attribution handle.","readOnly":true},"credentialIds":{"type":["array","null"],"description":"The credential IDs associated with the product","example":["af75417c71d24e708f506596ce5ab675"],"items":{"type":"string"},"writeOnly":true},"expiration":{"type":["string","null"],"description":"The expiration of the subscription (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z"},"quotaNotificationThreshold":{"type":"number","format":"double","description":"The percentage of quota consumption to exceed before sending a notification","example":0.75},"notificationAddressesOnCreation":{"type":["array","null"],"description":"Additional email addresses for ProductKey creation notification","example":["admin@example.com"],"items":{"type":"string"}},"notificationAddressesOnQuotaThreshold":{"type":["array","null"],"description":"Additional email addresses for ProductKey quota notifications","example":["ops@example.com","billing@example.com"],"items":{"type":"string"}},"start":{"type":["string","null"],"description":"The subscription start date (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z"},"periodStart":{"type":["string","null"],"description":"Start date of current subscription period (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z"},"periodEnd":{"type":["string","null"],"description":"End date of current subscription period (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-30T23:59:59Z"},"trialEnd":{"type":["string","null"],"description":"End date of subscription trial period (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z"},"namedSubscribers":{"type":["array","null"],"description":"List of user email addresses who are allowed to access the subscription","example":["user1@example.com","user2@example.com"],"items":{"type":"string"}},"namedOrganizations":{"type":["array","null"],"description":"The named organizations associated with this subscription","items":{"$ref":"#/components/schemas/ResourceMetadata_Read"},"readOnly":true},"namedOrganizationIds":{"type":["array","null"],"description":"The named organization IDs associated with this subscription","example":["6PV0xe"],"items":{"type":"string"},"writeOnly":true},"sendToSubscriber":{"type":["boolean","null"],"description":"Whether to send notifications to the subscriber","example":true},"quotas":{"type":["array","null"],"description":"The quotas associated with the subscription","items":{"$ref":"#/components/schemas/RatingAggregationQuota_Read"},"readOnly":true},"identityProvider":{"type":["string","null"],"description":"The name of the identity provider","example":"Auth0"},"additionalInvoiceRecipients":{"type":["array","null"],"description":"Additional email addresses for invoice notifications","example":["finance@example.com","accounting@example.com"],"items":{"type":"string"}},"charge":{"type":["number","null"],"description":"The recurring charge associated with this subscription","example":99.99},"wentOverSubscriptionQuota":{"type":["boolean","null"],"description":"Went over subscription quota?","example":false},"tags":{"type":["array","null"],"description":"Tags associated with the subscription","example":["enterprise","annual"],"items":{"type":"string"}},"externalQuoteId":{"type":["string","null"],"description":"The quote the product key may be associated with in an external cpq / financial system","example":"quote-12345"},"allowImmediateCancellation":{"type":["boolean","null"],"description":"Allow immediate cancellation of the subscription","example":true},"tierQuotaNotificationThreshold":{"type":["number","null"],"format":"double","description":"The threshold Percentage for tier quota notifications","example":80},"subscriptionId":{"type":["string","null"],"description":"The subscription Id","example":"sub-abc123"},"periodCallCountConsumed":{"type":["number","null"],"format":"double","description":"The period call count consumed","readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["name","ownerId","productId","teamId"]},"TierQuota_Read":{"type":"object","properties":{"tierName":{"type":["string","null"],"description":"The tier Name","readOnly":true},"tierId":{"type":["string","null"],"description":"The tier Id","readOnly":true},"tierQuotaConsumed":{"type":["number","null"],"description":"Amount of tier Quota consumed","example":4,"readOnly":true},"lowerTierQuotaLimit":{"type":["number","null"],"description":"Lower Tier Quota Limit","example":4,"readOnly":true},"tierQuota":{"type":["number","null"],"description":"Tier Quota","example":4,"readOnly":true},"wentOverTierQuota":{"type":["boolean","null"],"description":"True if tier quota has been exceeded","example":false,"readOnly":true}}},"SubscriberResource":{"type":"object","description":"subscriber","properties":{"id":{"type":"string","description":"The unique ID","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"user","readOnly":true},"label":{"type":"string","description":"The subscriber's label (automatically set to the email address for display purposes)","example":"user@example.com","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"email":{"type":"string","description":"The email address of the user","example":"ash@weyland-yutani.io"},"firstName":{"type":["string","null"],"description":"The first name of the user","example":"Ash"},"lastName":{"type":["string","null"],"description":"The last name of the user","example":"Williams"},"phoneNumber":{"type":["string","null"],"description":"The phone number associated with the user","example":"001-718-555-5555"},"tenant":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"organizations":{"type":["array","null"],"description":"The organizations the user belongs to","items":{"$ref":"#/components/schemas/ResourceMetadata"},"readOnly":true},"organizationIds":{"type":"array","description":"The organization IDs the user belongs to","example":["6PV0xe"],"items":{"type":"string"},"writeOnly":true},"subscriberId":{"type":["string","null"],"description":"The ID of the subscriber","example":"pEjxgX"},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["email"]},"SourceClassification":{"type":"object","description":"Pattern-based classification rule for automatically categorizing API sources based on their URL or path. Supports multiple matching strategies including prefix, suffix, substring, exact match, and regular expression patterns","properties":{"beginsWith":{"type":["string","null"],"description":"Prefix pattern to match against the source URL or path. If the source starts with this string, the classification rule matches","example":"/api/v2/"},"endsWith":{"type":["string","null"],"description":"Suffix pattern to match against the source URL or path. If the source ends with this string, the classification rule matches","example":"/health"},"contains":{"type":["string","null"],"description":"Substring pattern to match against the source URL or path. If the source contains this string anywhere, the classification rule matches","example":"/internal/"},"regex":{"type":["string","null"],"description":"Regular expression pattern to match against the source URL or path. Provides flexible pattern matching for complex classification rules","example":"^/api/v[0-9]+/users/.*$"},"equalsTo":{"type":["string","null"],"description":"Exact match pattern for the source URL or path. The source must exactly match this string for the classification rule to apply","example":"/api/v2/products"}}},"SourceResource":{"type":"object","description":"source","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"source","readOnly":true},"label":{"type":"string","description":"The source's label (automatically set to the source name for display purposes)","example":"my-awesome-source","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the source","example":"my-awesome-source"},"description":{"type":["string","null"],"description":"The description of the source","example":"Truly an awesome data source"},"version":{"type":"string","description":"The source's version","example":"1.0.0"},"descriptionAsHTML":{"type":["string","null"],"description":"The description of the source (HTML formatted)","example":"<b>Truly an awesome data source</b>"},"type":{"type":"string","description":"The type of the source","enum":["API","AI","UNCLASSIFIED","RESOURCE","CONNECTOR","TEMPLATE","POLICY","STREAM","CONSUMER_DATA","CUSTOM","APP","ROUTE"],"example":"API"},"autoDiscoveryEnabled":{"type":["boolean","null"],"description":"Whether or not the source is auto-discovered","example":false},"resource":{"type":["string","null"],"description":"The source's unique resource / URI","example":"/api/products"},"method":{"type":["string","null"],"description":"The source's method","example":"GET"},"logoURL":{"type":["string","null"],"description":"Path for the Assets' logo","example":"https://example.com/logo.png","readOnly":true},"devPortalLink":{"type":["string","null"],"description":"The devPortalLink of the asset","example":"https://devportal.example.com/my-awesome-source"},"sourceType":{"type":["string","null"],"description":"The source type of the asset (ie, MULESOFT, etc)","enum":["UNKNOWN","AI","SDK_PYTHON","SDK_JS","SDK_JVM","SDK_SPRING","SDK_DOTNET","SDK_GOLANG","SDK_RUST","EBPF","AWS","AZURE","SNOWFLAKE","GRAVITEE","MULESOFT","BOOMI","REVENIUM","INTERNAL"],"example":"MULESOFT"},"externalId":{"type":["string","null"],"description":"The external id associated with the source (generally an ID in an APIM platform)","example":"ext-source-001"},"externalUsagePlanId":{"type":["string","null"],"description":"The external plan id associated with the source (generally a usage plan in an APIM platform)","example":"usage-plan-abc123"},"tags":{"type":["array","null"],"description":"Tags associated with the source","example":["production","api","v1"],"items":{"type":"string"}},"sourceClassifications":{"type":["array","null"],"description":"The source classifications","example":[],"items":{"$ref":"#/components/schemas/SourceClassification"}},"owner":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"ownerId":{"type":["string","null"],"description":"The unique identifier of the source owner","example":"LjRrbJ","writeOnly":true},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this source","example":"a91XJp","writeOnly":true},"environment":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"meteringElementDefinitions":{"type":["array","null"],"description":"The metering element definitions associated with the source","items":{"$ref":"#/components/schemas/ResourceMetadata"},"readOnly":true},"products":{"type":["array","null"],"description":"The products associated with the source","items":{"$ref":"#/components/schemas/ResourceMetadata"},"readOnly":true},"meteringElementDefinitionIds":{"type":["array","null"],"description":"The metering element definition IDs associated with the source","example":["af75417c71d24e708f506596ce5ab675","bf86528d82e54f1a7df96ca7de747786"],"items":{"type":"string"},"writeOnly":true},"contracts":{"type":["array","null"],"description":"The API contract/specifications associated with the source","items":{"$ref":"#/components/schemas/ResourceMetadata"},"readOnly":true},"contractIds":{"type":["array","null"],"description":"The API contract/specifications IDs associated with the source","example":["af75417c71d24e708f506596ce5ab675"],"items":{"type":"string"},"writeOnly":true},"meteringId":{"type":["string","null"],"description":"The metering id associated with the source","readOnly":true},"metadata":{"type":["string","null"],"description":"Metadata","example":"language=En,test=test"},"assetUsageIdentifier":{"type":["string","null"],"description":"Type of metering identification for source","enum":["CUSTOM_ID","API_ENDPOINT","REVENIUM_ID"],"example":"REVENIUM_ID"},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["name","ownerId","teamId","type","version"]},"AIModelResource_Read":{"type":"object","description":"AI model metadata","properties":{"id":{"type":"string","description":"The unique identifier of the AI model","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"ai_model_metadata","readOnly":true},"label":{"type":"string","description":"The AI model's label (automatically set to the model name for display purposes)","example":"GPT-4 Turbo","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the model","example":"gpt-4-turbo"},"provider":{"type":"string","description":"The AI model provider. Allowed values: OPENAI, ANTHROPIC, OLLAMA, LITELLM, ALIBABA, GEMMA, DEEPSEEK, GOOGLE, GEMINI, AMAZON, CUSTOM","enum":["OPENAI","ANTHROPIC","OLLAMA","LITELLM","ALIBABA","GEMMA","DEEPSEEK","GOOGLE","GEMINI","AMAZON","CUSTOM"],"example":"OPENAI"},"inputCostPerToken":{"type":"number","description":"The cost per input token in USD","example":0.00001},"outputCostPerToken":{"type":"number","description":"The cost per output token in USD","example":0.00003},"cacheCreationCostPerInputToken":{"type":["number","null"],"description":"The cost per input token for cache creation in USD (for models that support prompt caching)","example":0.0000125},"cacheCreation1hrCostPerInputToken":{"type":["number","null"],"description":"The cost per input token for 1-hour-TTL cache creation in USD (for models that support prompt caching)","example":0.00002},"cacheReadCostPerInputToken":{"type":["number","null"],"description":"The cost per input token for cache reads in USD (for models that support prompt caching)","example":0.000001},"mode":{"type":"string","description":"The model mode or variant (e.g., 'chat', 'completion', 'embedding')","example":"chat"},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this AI model configuration. This field should be included in the request body when creating a new AI model.","example":"a91XJp","writeOnly":true},"supportFunctionCalling":{"type":["boolean","null"],"description":"Indicates if the model supports function calling","example":true},"supportsParallelFunctionCalling":{"type":["boolean","null"],"description":"Indicates if the model supports parallel function calling","example":true},"supportsResponseSchema":{"type":["boolean","null"],"description":"Indicates if the model supports response schema","example":true},"supportsVision":{"type":["boolean","null"],"description":"Indicates if the model supports vision capabilities","example":false},"supportsPromptCaching":{"type":["boolean","null"],"description":"Indicates if the model supports prompt caching","example":true},"supportsSystemMessages":{"type":["boolean","null"],"description":"Indicates if the model supports system messages","example":true},"supportsToolChoice":{"type":["boolean","null"],"description":"Indicates if the model supports tool choice","example":true},"supportsWebSearch":{"type":["boolean","null"],"description":"Indicates if the model supports web search","example":false},"pricingDimensions":{"type":"array","description":"All pricing dimensions for this model (token, image, audio, video, etc.). Empty if no dimensions are configured.","example":[],"items":{"$ref":"#/components/schemas/PricingDimensionResource_Read"},"readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["inputCostPerToken","name","outputCostPerToken","provider"]},"AIModelPatchResource_Read":{"type":"object","description":"Optional pricing overrides to apply to the cloned model. Only non-null fields will override the global model's pricing.","properties":{"inputCostPerToken":{"type":["number","null"],"description":"Cost per input token in USD. Must be non-negative with at most 10 decimal places.","example":0.00001,"writeOnly":true},"outputCostPerToken":{"type":["number","null"],"description":"Cost per output token in USD. Must be non-negative with at most 10 decimal places.","example":0.00003,"writeOnly":true},"cacheCreationCostPerInputToken":{"type":["number","null"],"description":"Cost per input token for cache creation in USD. Must be non-negative with at most 10 decimal places.","example":0.0000125,"writeOnly":true},"cacheCreation1hrCostPerInputToken":{"type":["number","null"],"description":"Cost per input token for 1-hour-TTL cache creation in USD. Must be non-negative with at most 10 decimal places.","example":0.00002,"writeOnly":true},"cacheReadCostPerInputToken":{"type":["number","null"],"description":"Cost per input token for cache reads in USD. Must be non-negative with at most 10 decimal places.","example":0.000001,"writeOnly":true}}},"AIAnomalyFilter":{"type":"object","description":"Filter criteria for querying AI anomaly detection results. Enables filtering anomalies by dimension (organization, product, model, etc.), comparison operator, and target value","properties":{"dimension":{"type":"string","description":"The dimension to filter on. Dimensions represent different aspects of AI usage that can be filtered","enum":["ORGANIZATION","CREDENTIAL","PRODUCT","MODEL","PROVIDER","AGENT","SUBSCRIBER","TASK_TYPE","WORKSPACE","API_KEY"]},"operator":{"type":"string","description":"The comparison operator to apply when filtering. Determines how the dimension value is compared against the filter value","enum":["IS","IS_NOT","CONTAINS","STARTS_WITH","ENDS_WITH"]},"value":{"type":"string","description":"The value to compare against using the specified operator. The format depends on the dimension being filtered","example":"gpt-4"}},"required":["dimension","operator","value"]},"AIAnomalyResource":{"type":"object","description":"AI anomaly alert configuration for monitoring AI metrics and costs. Supports threshold-based alerts, relative change detection, and cumulative usage tracking","properties":{"id":{"type":"string","description":"The unique identifier of the AI anomaly","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"ai_anomaly_metadata","readOnly":true},"label":{"type":"string","description":"The AI anomaly alert's label (automatically set to the alert name for display purposes)","example":"High Cost Anomaly - GPT-4","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"createdBy":{"type":["string","null"],"description":"The email address of the user who created this anomaly","example":"user@example.com","readOnly":true},"modifiedBy":{"type":["string","null"],"description":"The email address of the user who last modified this anomaly","example":"user@example.com","readOnly":true},"name":{"type":"string","description":"The name of the anomaly alert","example":"High Cost Alert"},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this anomaly alert.  The teamId can be found in the developer section of the Revenium web application.","example":"a91XJp","writeOnly":true},"alertType":{"type":"string","description":"The type of alert monitoring strategy. THRESHOLD monitors for absolute values exceeding a threshold, RELATIVE_CHANGE monitors for percentage changes between periods, CUMULATIVE_USAGE monitors for total usage over a period","enum":["THRESHOLD","RELATIVE_CHANGE","CUMULATIVE_USAGE"],"example":"THRESHOLD"},"dataSource":{"type":["string","null"],"description":"The data source for this alert. SDK uses real-time SDK instrumentation data, PROVIDER uses provider-synced billing data (OpenAI, Anthropic, etc.)","enum":["SDK","PROVIDER"],"example":"SDK"},"metricType":{"type":"string","description":"The AI metric to monitor. Cost metrics track spending, token metrics track usage, performance metrics track latency and duration, error metrics track failures","enum":["TOTAL_COST","COST_PER_TRANSACTION","TOKENS_PER_MINUTE","TOKEN_COUNT","INPUT_TOKEN_COUNT","OUTPUT_TOKEN_COUNT","CACHED_TOKEN_COUNT","TOKENS_PER_REQUEST","TIME_TO_FIRST_TOKEN","DURATION","ERROR_COUNT","ERROR_RATE","REQUESTS_PER_MINUTE","IMAGE_COUNT","DURATION_SECONDS","CHARACTER_COUNT","CREDITS_CONSUMED","COST_PER_IMAGE","COST_PER_SECOND","VIDEO_COUNT","AUDIO_COUNT"],"example":"TOTAL_COST"},"operatorType":{"type":"string","description":"The comparison operator used to evaluate the threshold. Comparison operators (GREATER_THAN, LESS_THAN, EQUAL_TO, NOT_EQUAL_TO, GREATER_THAN_OR_EQUAL_TO, LESS_THAN_OR_EQUAL_TO) compare absolute values. Change operators (PERCENT_INCREASE, PERCENT_DECREASE, INCREASES_BY, DECREASES_BY) compare relative changes between periods","enum":["GREATER_THAN","LESS_THAN","EQUAL_TO","NOT_EQUAL_TO","GREATER_THAN_OR_EQUAL_TO","LESS_THAN_OR_EQUAL_TO","PERCENT_DECREASE","PERCENT_INCREASE","INCREASES_BY","DECREASES_BY"],"example":"GREATER_THAN"},"threshold":{"type":"number","description":"The numeric threshold value that triggers the alert. For percentage-based alerts (when isPercentage is true), this represents the percentage value (e.g., 50 for 50%). For absolute value alerts, this is the metric value to compare against","example":100.5},"notificationAddresses":{"type":"array","description":"Email addresses to notify when the alert is triggered. Multiple addresses can be specified. Each address will receive an email notification when the anomaly condition is met","example":["admin@example.com","ops@example.com"],"items":{"type":"string"}},"slackConfigurations":{"type":"array","description":"Slack configuration IDs to notify when the alert is triggered. Each configuration represents a Slack workspace and channel where notifications will be posted","example":["slack-config-id-1","slack-config-id-2"],"items":{"type":"string"}},"description":{"type":["string","null"],"description":"Optional description providing additional context about the alert's purpose and configuration","example":"Monitors total AI costs to prevent budget overruns"},"periodDuration":{"type":["string","null"],"description":"The time period over which the metric is evaluated. For THRESHOLD and RELATIVE_CHANGE alerts, this determines the evaluation window. For CUMULATIVE_USAGE alerts, this determines the accumulation period","enum":["ONE_MINUTE","FIVE_MINUTES","FIFTEEN_MINUTES","THIRTY_MINUTES","ONE_HOUR","TWELVE_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","DAILY","WEEKLY","MONTHLY","QUARTERLY"],"example":"ONE_HOUR"},"enabled":{"type":"boolean","description":"Whether the anomaly alert is active. When false, the alert is disabled without being deleted from the database. Disabled alerts do not evaluate conditions or send notifications","example":true},"filters":{"type":["array","null"],"description":"Filter criteria to limit the scope of anomaly monitoring. Each filter specifies a dimension (e.g., ORGANIZATION, PRODUCT, MODEL), an operator (e.g., IS, CONTAINS), and a value to match. Only metrics matching all filters are evaluated","items":{"$ref":"#/components/schemas/AIAnomalyFilter"}},"webhookConfigurations":{"type":"array","description":"Webhook configuration IDs to notify when the alert is triggered. Each configuration represents a webhook endpoint that will receive a POST request with alert details","example":["webhook-config-id-1"],"items":{"type":"string"}},"firing":{"type":"boolean","description":"Whether the anomaly alert is currently triggered. True indicates the alert condition is currently met and notifications have been sent. This is a read-only field automatically updated by the system","example":false,"readOnly":true},"groupBy":{"type":["string","null"],"description":"The dimension by which to group anomaly monitoring. When specified, separate alerts are evaluated for each unique value of this dimension (e.g., per ORGANIZATION, per MODEL, per PRODUCT)","enum":["ORGANIZATION","CREDENTIAL","PRODUCT","MODEL","PROVIDER","AGENT","SUBSCRIBER","TASK_TYPE","WORKSPACE","API_KEY"],"example":"MODEL"},"triggerAfterPersistsDuration":{"type":["string","null"],"description":"The duration the anomaly condition must persist before triggering the alert. This prevents false positives from transient spikes. If null, the alert triggers immediately when the condition is met","enum":["ONE_MINUTE","FIVE_MINUTES","FIFTEEN_MINUTES","THIRTY_MINUTES","ONE_HOUR","TWELVE_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","DAILY","WEEKLY","MONTHLY","QUARTERLY"],"example":"FIVE_MINUTES"},"isPercentage":{"type":["boolean","null"],"description":"Whether the threshold value represents a percentage. When true, the threshold is interpreted as a percentage value. When false or null, the threshold is an absolute value","example":false},"_links":{"$ref":"#/components/schemas/Links"}},"required":["alertType","enabled","firing","metricType","name","operatorType","periodDuration","teamId","threshold"]},"SignupStatusResponse":{"type":"object","description":"The caller's current state in the domain-join signup flow","properties":{"state":{"type":"string","description":"The requester's current state in the domain-join flow","enum":["PROVISIONED","NO_MATCH","OFFER_JOIN","PENDING","DENIED","EXPIRED","WITHDRAWN"],"example":"OFFER_JOIN"},"requestedAt":{"type":["string","null"],"description":"When the current join request was created (ISO 8601 extended date-time format), if any","example":"2025-10-13T19:09:08.234Z"},"expiresAt":{"type":["string","null"],"description":"When the current PENDING join request expires (ISO 8601 extended date-time format), if any","example":"2025-10-20T19:09:08.234Z"}}},"SessionAttributionRequest":{"type":"object","description":"Session → ticket attribution payload","properties":{"ticketId":{"type":"string"},"ticketTitle":{"type":["string","null"]},"reason":{"type":["string","null"]},"source":{"type":"string","enum":["claude-code","gemini-cli","codex","cursor","copilot","other"]},"subscriberEmail":{"type":["string","null"]},"repo":{"type":["string","null"]},"branch":{"type":["string","null"]},"effectiveFrom":{"type":["string","null"],"format":"date-time"}}},"SessionAttributionResource":{"type":"object","description":"Session → ticket attribution result","properties":{"sessionId":{"type":"string"},"ticketId":{"type":"string"},"ticketTitle":{"type":["string","null"]},"reason":{"type":["string","null"]},"source":{"type":"string"},"subscriberEmail":{"type":["string","null"]},"repo":{"type":["string","null"]},"branch":{"type":["string","null"]},"effectiveFrom":{"type":"string"}}},"ChartConfigurationResource":{"type":"object","description":"Complete chart configuration","properties":{"mode":{"type":"string","description":"Chart data mode","enum":["time","aggregate"],"example":"time"},"chartType":{"type":"string","description":"Chart visualization type","enum":["line","bar","column","dual-axis","pie"],"example":"line"},"dateRange":{"type":"string","description":"Preset date range or 'custom'","enum":["1h","8h","24h","7d","30d","90d","180d","365d","custom"],"example":"30d"},"customDateRange":{"oneOf":[{"$ref":"#/components/schemas/CustomDateRangeResource"},{"type":"null"}]},"grain":{"type":["string","null"],"description":"Time granularity for aggregation","enum":["auto","five_minute","hour","day","week","month"],"example":"day"},"primaryMetric":{"$ref":"#/components/schemas/MetricConfigurationResource","description":"Primary metric configuration"},"secondaryMetric":{"oneOf":[{"$ref":"#/components/schemas/MetricConfigurationResource"},{"type":"null"}]},"primaryGroupBy":{"type":["string","null"],"description":"Primary grouping dimension","enum":["none","customer","model","provider","agent","product","task","subscriber","modality","org_unit"],"example":"customer"},"secondaryGroupBy":{"type":["string","null"],"description":"Secondary grouping dimension (dual-axis only)","enum":["none","customer","model","provider","agent","product","task","subscriber","modality","org_unit"],"example":"model"},"filters":{"type":["array","null"],"description":"Data preparation filters","items":{"$ref":"#/components/schemas/DataFilterResource"}},"chartFocus":{"oneOf":[{"$ref":"#/components/schemas/ChartFocusResource"},{"type":"null"}]},"codingAssistantScope":{"type":["string","null"],"description":"Coding-assistant scope for this chart: 'policy' (default; count assistants per the team's api-rate billing policy), 'all' (count every coding assistant), or 'none' (exclude all coding assistants). Null/absent = policy.","enum":["policy","all","none"],"example":"policy"}},"required":["chartType","dateRange","mode","primaryMetric"]},"ChartDefinitionResource":{"type":"object","description":"A saved chart configuration","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"chart_definition","readOnly":true},"label":{"type":"string","description":"The object's label","example":"Monthly Cost by Provider","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"User-defined chart name","example":"Monthly Cost by Provider"},"description":{"type":["string","null"],"description":"Chart description","example":"Track AI costs across different providers with monthly aggregation"},"configuration":{"$ref":"#/components/schemas/ChartConfigurationResource","description":"Complete chart configuration"},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"teamId":{"type":"string","description":"The team identifier","writeOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["configuration"]},"ChartFocusResource":{"type":"object","description":"Chart focus configuration","properties":{"method":{"type":"string","description":"Focus method to apply","enum":["all","topN","valueThreshold"],"example":"topN"},"topN":{"oneOf":[{"$ref":"#/components/schemas/TopNConfigurationResource"},{"type":"null"}]},"valueThreshold":{"oneOf":[{"$ref":"#/components/schemas/ValueThresholdConfigurationResource"},{"type":"null"}]}},"required":["method"]},"CustomDateRangeResource":{"type":"object","description":"Custom date range","properties":{"startDate":{"type":"string","description":"Start date (ISO 8601)","example":"2025-08-01T00:00:00Z"},"endDate":{"type":"string","description":"End date (ISO 8601)","example":"2025-08-19T23:59:59Z"}},"required":["endDate","startDate"]},"DataFilterResource":{"type":"object","description":"Data filter","properties":{"field":{"type":"string","description":"Field to filter on","enum":["customer","model","provider","agent","product","task","subscriberEmail","totalCost","errorReason","isStreamed","operationType","environment"],"example":"provider"},"op":{"type":"string","description":"Filter operator","enum":["equals","not_equals","contains","not_contains","starts_with","in","not_in","is_null","is_not_null","greater_than","less_than","between"],"example":"in"},"value":{"type":"null","description":"Filter value (type varies by field)"},"label":{"type":["string","null"],"description":"Display label for the filter","example":"Provider"}},"required":["field","op"]},"MetricConfigurationResource":{"type":"object","description":"Metric configuration","properties":{"baseMetric":{"type":"string","description":"Base metric identifier","enum":["totalCost","requestCount","tokenCount","inputTokens","outputTokens","latency","errorCount","errorRate","imageCount","durationSeconds","characterCount","creditsConsumed"],"example":"totalCost"},"calculationType":{"type":"string","description":"Calculation to apply","enum":["total","average","per-request","per-token","per-entity","median","maximum"],"example":"total"},"entityType":{"type":["string","null"],"description":"Entity type for per-entity calculations","enum":["customer","agent","product","model","provider","task","subscriber"],"example":"customer"}},"required":["baseMetric","calculationType"]},"ThresholdCriteriaResource":{"type":"object","description":"Threshold criteria","properties":{"metric":{"type":"string","description":"Metric to evaluate","enum":["totalCost","requestCount","tokenCount","inputTokens","outputTokens","latency","errorCount","errorRate","imageCount","durationSeconds","characterCount","creditsConsumed"],"example":"totalCost"},"operator":{"type":"string","description":"Comparison operator","enum":["above","below"],"example":"above"},"value":{"type":"number","format":"double","description":"Threshold value","example":50}},"required":["metric","operator","value"]},"TopNConfigurationResource":{"type":"object","description":"Top N configuration","properties":{"count":{"type":"integer","format":"int32","description":"Number of top/bottom results to show","example":10},"direction":{"type":"string","description":"Sort direction","enum":["highest","lowest"],"example":"highest"},"metric":{"type":"string","description":"Metric to sort by","enum":["totalCost","requestCount","tokenCount","inputTokens","outputTokens","latency","errorCount","errorRate","imageCount","durationSeconds","characterCount","creditsConsumed"],"example":"totalCost"},"includeOther":{"type":"boolean","description":"Include 'Other' category for remaining items","example":true}},"required":["count","direction","includeOther","metric"]},"ValueThresholdConfigurationResource":{"type":"object","description":"Value threshold configuration","properties":{"primary":{"$ref":"#/components/schemas/ThresholdCriteriaResource","description":"Primary threshold criteria"},"secondary":{"oneOf":[{"$ref":"#/components/schemas/ThresholdCriteriaResource"},{"type":"null"}]}},"required":["primary"]},"AxisDefinition":{"type":"object","description":"Axis definition","properties":{"type":{"type":"string","description":"Axis data type","enum":["datetime","categorical","numeric"],"example":"datetime"},"label":{"type":"string","description":"Axis label","example":"Date"},"unit":{"type":["string","null"],"description":"Unit of measurement (for numeric axes)","example":"currency"}}},"ChartBuilderGenerateResponse":{"type":"object","description":"Generated chart data response","properties":{"data":{"$ref":"#/components/schemas/ChartData","description":"Chart data containing series"},"schema":{"$ref":"#/components/schemas/ChartSchema","description":"Chart schema defining axes and data types"},"metadata":{"$ref":"#/components/schemas/ChartResponseMetadata","description":"Chart metadata including applied filters and statistics"}}},"ChartData":{"type":"object","description":"Chart data container","properties":{"series":{"type":["array","null"],"description":"Data series for single-axis charts","items":{"$ref":"#/components/schemas/DataSeries"}},"primarySeries":{"type":["array","null"],"description":"Primary axis data series for dual-axis charts","items":{"$ref":"#/components/schemas/DataSeries"}},"secondarySeries":{"type":["array","null"],"description":"Secondary axis data series for dual-axis charts","items":{"$ref":"#/components/schemas/DataSeries"}}}},"ChartResponseMetadata":{"type":"object","description":"Chart response metadata","properties":{"mode":{"type":"string","description":"Chart mode from request","enum":["time","aggregate"],"example":"time"},"chartType":{"type":"string","description":"Chart type from request","enum":["line","bar","column","dual-axis","pie"],"example":"line"},"dateRange":{"$ref":"#/components/schemas/DateRangeMetadata","description":"Actual date range used"},"grain":{"oneOf":[{"$ref":"#/components/schemas/GrainMetadata"},{"type":"null"}]},"aggregatedPeriod":{"type":["string","null"],"description":"Human-readable aggregation period (for aggregate mode)","example":"7 days"},"appliedFilters":{"type":["array","null"],"description":"Human-readable list of applied data preparation filters","items":{"type":"string"}},"appliedChartFocus":{"type":["string","null"],"description":"Human-readable description of applied chart focus","example":"Top 5 highest by Total Cost + Other category"},"totalResultsBeforeFiltering":{"type":["integer","null"],"format":"int32","description":"Number of transaction records before data preparation filters"},"totalResultsAfterFiltering":{"type":["integer","null"],"format":"int32","description":"Number of transaction records after data preparation filters"},"totalSeriesBeforeChartFocus":{"type":["integer","null"],"format":"int32","description":"Number of series before chart focus applied"},"totalSeriesAfterChartFocus":{"type":["integer","null"],"format":"int32","description":"Number of series after chart focus applied"},"otherCategoryIncluded":{"type":["boolean","null"],"description":"Whether 'Other' category was included in chart focus"},"otherCategoryValue":{"type":["number","null"],"format":"double","description":"Total value in 'Other' category"},"primaryCalculation":{"type":["string","null"],"description":"Primary metric calculation type","enum":["total","average","per-request","per-token","per-entity","median","maximum"],"example":"total"},"secondaryCalculation":{"type":["string","null"],"description":"Secondary metric calculation type (dual-axis only)","enum":["total","average","per-request","per-token","per-entity","median","maximum"],"example":"average"},"calculation":{"type":["string","null"],"description":"Calculation type (single-axis charts)","enum":["total","average","per-request","per-token","per-entity","median","maximum"],"example":"per-entity"},"entityType":{"type":["string","null"],"description":"Entity type for per-entity calculations","enum":["customer","agent","product","model","provider","task","subscriber"],"example":"customer"},"groupingLocked":{"type":["boolean","null"],"description":"Whether grouping is locked due to calculation type"},"lockedReason":{"type":["string","null"],"description":"Explanation for locked grouping"},"independentGrouping":{"type":["boolean","null"],"description":"Whether dual-axis chart uses independent grouping"},"totalDataPoints":{"type":"integer","format":"int32","description":"Total number of data points across all series","example":90},"seriesCount":{"type":["integer","null"],"format":"int32","description":"Total number of series (single-axis charts)"},"primarySeriesCount":{"type":["integer","null"],"format":"int32","description":"Number of primary series (dual-axis charts)"},"secondarySeriesCount":{"type":["integer","null"],"format":"int32","description":"Number of secondary series (dual-axis charts)"},"generatedAt":{"type":"string","description":"Timestamp when data was generated (ISO 8601)","example":"2025-08-19T10:30:00Z"}}},"ChartSchema":{"type":"object","description":"Chart schema","properties":{"primaryXAxis":{"oneOf":[{"$ref":"#/components/schemas/AxisDefinition"},{"type":"null"}]},"secondaryXAxis":{"oneOf":[{"$ref":"#/components/schemas/AxisDefinition"},{"type":"null"}]},"primaryYAxis":{"oneOf":[{"$ref":"#/components/schemas/AxisDefinition"},{"type":"null"}]},"secondaryYAxis":{"oneOf":[{"$ref":"#/components/schemas/AxisDefinition"},{"type":"null"}]},"yAxis":{"oneOf":[{"$ref":"#/components/schemas/AxisDefinition"},{"type":"null"}]},"xAxis":{"oneOf":[{"$ref":"#/components/schemas/AxisDefinition"},{"type":"null"}]}}},"DataPoint":{"type":"object","description":"Chart data point","properties":{"timestamp":{"type":["integer","null"],"format":"int64","description":"Unix timestamp in milliseconds (for time-series data)","example":1723680000000},"category":{"type":["string","null"],"description":"Category label (for categorical data)","example":"GPT-4"},"categoryId":{"type":["string","null"],"description":"Category identifier (for categorical data)","example":"gpt-4"},"value":{"type":"number","format":"double","description":"Numeric value","example":125.5},"metadata":{"type":["object","null"],"additionalProperties":{},"description":"Additional data point metadata"}},"required":["value"]},"DataSeries":{"type":"object","description":"Chart data series","properties":{"id":{"type":"string","description":"Unique series identifier","example":"acme-corp-total-cost"},"name":{"type":"string","description":"Display name for the series","example":"Acme Corp"},"metric":{"type":"string","description":"Metric being measured","enum":["totalCost","requestCount","tokenCount","inputTokens","outputTokens","latency","errorCount","errorRate","imageCount","durationSeconds","characterCount","creditsConsumed"],"example":"totalCost"},"calculation":{"type":"string","description":"Calculation type applied","enum":["total","average","per-request","per-token","per-entity","median","maximum"],"example":"total"},"groupBy":{"type":["string","null"],"description":"Grouping dimension","enum":["none","customer","model","provider","agent","product","task","subscriber","modality","org_unit"],"example":"customer"},"groupValue":{"type":["string","null"],"description":"Value of the grouping dimension","example":"acme-corp"},"unit":{"type":"string","description":"Unit of measurement","example":"currency"},"entityType":{"type":["string","null"],"description":"Entity type for per-entity calculations","enum":["customer","agent","product","model","provider","task","subscriber"],"example":"customer"},"axis":{"type":["string","null"],"description":"Which axis this series belongs to (for dual-axis charts)","enum":["primary","secondary"],"example":"primary"},"dataPoints":{"type":"array","description":"Array of data points in this series","items":{"$ref":"#/components/schemas/DataPoint"}},"isOtherCategory":{"type":["boolean","null"],"description":"Whether this is the 'Other' aggregated category"}}},"DateRangeMetadata":{"type":"object","description":"Date range metadata","properties":{"start":{"type":"string","description":"Start date (ISO 8601)","example":"2025-08-12T00:00:00Z"},"end":{"type":"string","description":"End date (ISO 8601)","example":"2025-08-19T23:59:59Z"}}},"GrainMetadata":{"type":"object","description":"Grain metadata","properties":{"requested":{"type":"string","description":"Requested grain from request","enum":["auto","five_minute","hour","day","week","month"],"example":"day"},"applied":{"type":"string","description":"Actually applied grain (may differ if 'auto' was requested)","enum":["auto","five_minute","hour","day","week","month"],"example":"day"},"bucketSize":{"type":"integer","format":"int64","description":"Bucket size in milliseconds","example":86400000},"dataPointsPerSeries":{"type":"integer","format":"int32","description":"Number of data points per series","example":30}}},"InvoiceManagementResource_Read":{"type":"object","description":"Invoice management configuration for a product that controls automatic invoice resend behavior. Defines how frequently and how many times unpaid invoices should be automatically resent to customers","properties":{"resendPeriod":{"type":"string","description":"The time unit for the invoice resend interval. Determines the frequency at which unpaid invoices are automatically resent","enum":["DAY","MONTH","YEAR","TEST_MINUTE","TEST_MINUTE_WITH_SYNTHETIC_METERING","NONE"],"example":"MONTH"},"resendPeriodCount":{"type":"integer","format":"int64","description":"The number of time periods to wait between invoice resends. For example, 3 with resendPeriod=MONTH means resend every 3 months","example":3},"numberOfResends":{"type":"integer","format":"int64","description":"The maximum number of times to automatically resend an unpaid invoice before stopping. Prevents infinite resend loops","example":3}},"required":["numberOfResends","resendPeriod","resendPeriodCount"]},"PerformanceDefinition_Read":{"type":"object","description":"An API Performance Definition","properties":{"name":{"type":"string","description":"The name of an performance definition","example":"Platinum Tier"},"description":{"type":"string","description":"The description of an performance definition","example":"Platinum Tier"},"maxRequests":{"type":"integer","format":"int32","description":"The maximum amount of requests allowed for the given interval","example":100},"timePeriod":{"type":"integer","format":"int32","description":"The time period","example":2},"timeUnit":{"type":"string","description":"The time unit","enum":["MILLISECONDS","SECONDS","MINUTES","HOURS","DAYS","WEEKS","MONTHS","YEARS"],"example":"MINUTES"}},"required":["description","maxRequests","name","timePeriod","timeUnit"]},"PlanElement_Read":{"type":"object","description":"Metering element within a pricing plan that defines what is measured and how it is charged. Plan elements specify the metric being tracked, the pricing model (flat rate, per-unit, or tiered), and any specific values to filter on","properties":{"name":{"type":"string","description":"The name of the metering element for identification purposes","example":"Shipping Weight"},"elementDefinitionId":{"type":"string","description":"The unique identifier of the element definition that specifies what metric is being measured (e.g., API calls, data transfer, compute time)","example":"sBcTTs3"},"distinctValue":{"type":["string","null"],"description":"Optional filter value to charge only for specific metric values. For example, if measuring by country, this could be 'FRANCE' to charge only for French traffic. Case insensitive","example":"premium"},"flatAmount":{"type":["number","null"],"description":"Fixed charge amount applied regardless of usage volume. Used for flat-rate pricing models. Mutually exclusive with unitAmount in most pricing strategies","example":99.99},"unitAmount":{"type":["number","null"],"description":"Per-unit charge amount applied to each measured unit. For example, $0.01 per API call or $0.05 per GB transferred. Used for usage-based pricing models","example":0.01},"type":{"type":"string","description":"The metering/aggregation method for this plan element, determining how metric values are counted, summed, or analyzed for billing. This is the plan element's `type` field and is distinct from a rating aggregation's `aggregationType` field. COUNT_DISTINCT_VALUE_BY_NAME and DISTINCT_VALUE_BY_NAME are valid here but are not valid `aggregationType` values.","enum":["DISTINCT_VALUE_BY_NAME","COUNT_DISTINCT_VALUE_BY_NAME","SUM","COUNT","MAXIMUM","AVERAGE","UNIQUE"],"example":"COUNT"}},"required":["elementDefinitionId","name","type"]},"Plan_Read":{"type":"object","description":"Product pricing plan configuration defining billing structure, pricing tiers, metering elements, and subscription terms. Plans support recurring subscriptions with optional trial periods and metered usage","properties":{"type":{"type":"string","description":"The plan type determining the billing model. SUBSCRIPTION represents recurring billing with optional metered usage.","enum":["SUBSCRIPTION"],"example":"SUBSCRIPTION"},"name":{"type":"string","description":"The name of the plan for identification and display purposes","example":"Professional Plan"},"currency":{"type":"string","description":"The currency code for all pricing in this plan","enum":["USD","EUR","CAD","GBP","JPY","CNY","MXN","COP","ARS","ZMW","AUD","ZWG"],"example":"USD"},"period":{"type":["string","null"],"description":"The billing period unit. Defines the recurring billing cycle (e.g., MONTH for monthly billing). Valid values: DAY, MONTH, YEAR, TEST_MINUTE, TEST_MINUTE_WITH_SYNTHETIC_METERING, NONE","enum":["DAY","MONTH","YEAR","TEST_MINUTE","TEST_MINUTE_WITH_SYNTHETIC_METERING","NONE"],"example":"MONTH"},"periodCount":{"type":["integer","null"],"format":"int64","description":"The number of period units between billing cycles. For example, 3 with period=MONTH means billing every 3 months. Must be a positive integer (e.g., 1, 3, 12)","example":1},"trialPeriod":{"type":["string","null"],"description":"The trial period unit for subscription plans","enum":["DAY","MONTH","YEAR","TEST_MINUTE","TEST_MINUTE_WITH_SYNTHETIC_METERING","NONE"],"example":"DAY"},"trialPeriodCount":{"type":["integer","null"],"format":"int64","description":"The number of trial period units before billing begins. For example, 14 with trialPeriod DAY means a 14-day free trial","example":14},"charge":{"type":["number","null"],"description":"The fixed recurring charge amount for subscription plans. This is the base subscription fee charged each billing period","example":99.99},"graduated":{"type":"boolean","description":"Indicates whether volume pricing tiers are graduated (cumulative) or not. When true, each tier applies only to usage within that tier's range. When false, the entire usage is charged at the rate of the highest tier reached","example":true},"prePayAllFlatRates":{"type":["boolean","null"],"description":"Indicates whether subscription flat rate charges should be paid upfront at subscription creation rather than at the end of the first billing period","example":false},"tiers":{"type":["array","null"],"description":"Volume-based pricing tiers that define different rates based on usage levels. Each tier specifies a usage range and corresponding pricing","items":{"$ref":"#/components/schemas/Tier_Read"}},"elements":{"type":["array","null"],"description":"Metering elements that define what is being measured and billed in this plan. Each element specifies a metric, unit price, and optional quotas","items":{"$ref":"#/components/schemas/PlanElement_Read"}},"setupFees":{"type":["array","null"],"description":"One-time setup fees charged when a subscription is created. Each setup fee has a name, amount, and type","items":{"$ref":"#/components/schemas/SetupFee_Read"}},"ratingAggregations":{"type":["array","null"],"description":"Usage aggregation rules that define how metered usage is grouped and calculated for billing purposes. Includes quota limits and overage handling","items":{"$ref":"#/components/schemas/RatingAggregation_Read"}}},"required":["currency","name","type"]},"ProductResource_Read":{"type":"object","description":"A Product","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"product","readOnly":true},"label":{"type":"string","description":"The product's label (automatically set to the product name for display purposes)","example":"My Awesome Product","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this product","example":"a91XJp","writeOnly":true},"owner":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"ownerId":{"type":["string","null"],"description":"The unique identifier of the product owner","example":"LjRrbJ","writeOnly":true},"sourceConfiguration":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"sourceConfigurationId":{"type":["string","null"],"description":"The source configuration ID","example":"af75417c71d24e708f506596ce5ab675","writeOnly":true},"sources":{"type":["array","null"],"description":"The sources associated with the product","items":{"$ref":"#/components/schemas/ResourceMetadata_Read"},"readOnly":true},"sourceIds":{"type":["array","null"],"description":"The source IDs associated with the product","example":["af75417c71d24e708f506596ce5ab675","bf86528d82e54f1a7df96ca7de747786"],"items":{"type":"string"},"writeOnly":true},"environment":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"environmentId":{"type":["string","null"],"description":"The environment id","example":"af75417c71d24e708f506596ce5ab675","writeOnly":true},"name":{"type":"string","description":"The name of the product","example":"my-awesome-product"},"version":{"type":"string","description":"The version of the product following semantic versioning (MAJOR.MINOR.PATCH). When creating a product, specify the initial version (e.g., '1.0.0'). When updating a product, the API automatically increments the version based on internal versioning rules. You can specify a version in the update request, but the API may override it","example":"1.0.0"},"externalLabel":{"type":["string","null"],"description":"An external label for the product that is exposed in developer portals","example":"An Awesome Product"},"plan":{"oneOf":[{"$ref":"#/components/schemas/Plan_Read"},{"type":"null"}]},"portalLabel":{"type":["string","null"],"description":"An external label for the product that is exposed in developer portals","example":"Product Name"},"externalId":{"type":["string","null"],"description":"An external identifier (ie, in a api management system) that is associated with the Product","example":"12345abcd"},"portalId":{"type":["string","null"],"description":"An external id for the product that is exposed in developer portals","example":"Product Name"},"description":{"type":["string","null"],"description":"The description of the product","example":"Truly an awesome product"},"descriptionAsHTML":{"type":["string","null"],"description":"The description of the product (HTML formatted)","example":"<b>Truly an awesome product</b>"},"shortDescription":{"type":["string","null"],"description":"A short description of the product","example":"Truly an awesome product"},"shortDescriptionAsHTML":{"type":["string","null"],"description":"The short description of the product (HTML formatted)","example":"<b>Truly an awesome product</b>"},"published":{"type":["boolean","null"],"description":"Whether or not the product is published to a developer portal","example":true},"preview":{"type":["boolean","null"],"description":"Whether or not the product is in preview mode in a developer portal","example":false},"audienceRestriction":{"type":["string","null"],"description":"The audience restriction, if any, on a product","enum":["USER","ORGANIZATION"],"example":"USER"},"code":{"type":["string","null"],"description":"The product code","example":"dkfjsl-1234"},"notifyClientOnInvoice":{"type":["boolean","null"],"description":"Notify client when an invoice is generated for this product"},"notificationAddressesOnInvoice":{"type":["array","null"],"description":"A list of email addresses to notify when an invoice is generated for this product","example":["billing@example.com","finance@example.com"],"items":{"type":"string"}},"logo":{"type":["string","null"],"description":"The product's logo","readOnly":true},"logoByteArray":{"type":["string","null"],"format":"byte","description":"The product's logo as a byte array"},"apimGroupId":{"type":["string","null"],"description":"An external API group identifier (ie, in a API management system) that is associated with the Product","example":"apim-group-1234"},"pricingDescription":{"type":["string","null"],"description":"The pricing description","example":"Pay as you go pricing based on API calls"},"pricingDescriptionAsHTML":{"type":["string","null"],"description":"The pricing description (HTML formatted)","example":"<p>Pay as you go pricing based on <b>API calls</b></p>"},"tags":{"type":["array","null"],"description":"A list of tags associated with this product. Optional field - can be omitted entirely, provided as empty array [], or contain tag values","example":["tag1","tag2","tag3"],"items":{"type":"string"}},"terms":{"type":["array","null"],"description":"Terms and conditions associated with this product.","items":{"$ref":"#/components/schemas/Terms_Read"}},"invoiceManagement":{"oneOf":[{"$ref":"#/components/schemas/InvoiceManagementResource_Read"},{"type":"null"}]},"paymentSource":{"type":["string","null"],"description":"The product payment source","enum":["EXTERNAL_PAYMENT_NOTIFICATION","PAYMENT_VIA_PAYMENT_PROVIDER","INVOICE_ONLY_NO_PAYMENT"],"example":"PAYMENT_VIA_PAYMENT_PROVIDER"},"comingSoon":{"type":"boolean","description":"Whether to display the coming soon ribbon"},"comingSoonText":{"type":["string","null"],"description":"The text to display in the coming soon ribbon","example":"Coming Soon!"},"meteringModels":{"type":["array","null"],"description":"The metering models associated with the product. Optional field - can be omitted entirely, provided as empty array [], or contain model values","example":["TRANSACTIONAL"],"items":{"type":"string","enum":["TRANSACTIONAL","RESOURCE"]}},"notifyClientTrialAboutToExpire":{"type":["boolean","null"],"description":"Whether to notify the client when the trial is about to expire"},"paymentConfigurationId":{"type":["string","null"],"description":"The payment configuration ID associated with the product","example":"dka2dk2"},"tierQuotaNotificationThreshold":{"type":["number","null"],"format":"double","description":"The threshold Percentage for tier quota notifications","example":80},"displayPriority":{"type":["number","null"],"format":"double","description":"The displayPriority of the product","example":13},"apimConfigurationId":{"type":["string","null"],"description":"The Anypoint configuration ID associated with the product","example":"dka2dk2"},"performanceDefinition":{"oneOf":[{"$ref":"#/components/schemas/PerformanceDefinition_Read"},{"type":"null"}]},"syncedToGateway":{"type":["boolean","null"],"description":"Whether or not the product is synchronized with an API Gateway","example":true,"readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["name","ownerId","plan","teamId","version"]},"RatingAggregation_Read":{"type":"object","description":"Usage-based pricing configuration that defines how metered data is aggregated and billed. Rating aggregations enable complex pricing models by specifying what metric to measure, how to calculate it, and what pricing tiers to apply based on usage levels","properties":{"id":{"type":["string","null"],"description":"The unique identifier of the rating aggregation","example":"l3kR6l","readOnly":true},"name":{"type":"string","description":"The name of the rating aggregation for identification and display purposes","example":"API Calls by Region"},"elementDefinitionId":{"type":"string","description":"The identifier of the element definition that specifies which metric to aggregate. References an ElementDefinition that defines the data field to measure","example":"3By6OgB"},"graduated":{"type":["boolean","null"],"description":"Determines the tier pricing model. When true, uses graduated pricing where each tier's rate applies only to usage within that tier's range. When false, uses volume pricing where the entire usage is charged at the rate of the highest tier reached","example":true},"distinctValue":{"type":["string","null"],"description":"Optional filter value for distinct-value-based aggregations. When specified, only metrics matching this value (case insensitive) are included in the aggregation. For example, 'FRANCE' to aggregate only transactions where the metering element was sent with the value 'FRANCE' to aggregate French transactions.","example":"PREMIUM"},"aggregationType":{"type":"string","description":"The method used to calculate the aggregated value from the metered data. To count distinct values (for example, unique regions or customer IDs), use DISTINCT. This is separate from a plan element's `type` field: values like COUNT_DISTINCT_VALUE_BY_NAME and DISTINCT_VALUE_BY_NAME belong to the plan element `type` field, not to aggregationType.","enum":["SUM","COUNT","MAXIMUM","AVERAGE","UNIQUE","DISTINCT","LAST_RECEIVED"],"example":"SUM"},"tiers":{"type":["array","null"],"description":"Volume-based pricing tiers that define different rates based on usage levels. Each tier specifies a usage range and corresponding pricing.","items":{"$ref":"#/components/schemas/Tier_Read"}}},"required":["aggregationType","elementDefinitionId","name"]},"SetupFee_Read":{"type":"object","description":"One-time setup fee charged when a subscription is created or an organization is onboarded. Setup fees can be applied at the organization level or per-subscription level","properties":{"id":{"type":["string","null"],"description":"The unique identifier of the setup fee","example":"Rl41jE","readOnly":true},"name":{"type":"string","description":"The name of the setup fee for identification and display on invoices","example":"Onboarding Fee"},"type":{"type":"string","description":"The scope at which the setup fee is applied. ORGANIZATION applies the fee once per organization, SUBSCRIPTION applies the fee for each new subscription","enum":["ORGANIZATION","SUBSCRIPTION"],"example":"SUBSCRIPTION"},"flatAmount":{"type":["number","null"],"description":"The fixed amount charged for this setup fee","example":499}},"required":["name","type"]},"Terms_Read":{"type":"object","description":"Terms and conditions document associated with a product. Defines legal terms, service agreements, or usage policies that customers must accept when subscribing to or purchasing a product","properties":{"link":{"type":"string","description":"URL or reference link to the full terms and conditions document. Can be an external URL or internal document identifier","example":"https://example.com/terms/standard-tos.pdf"},"terms":{"type":"string","description":"The full text or summary of the terms and conditions. Can contain the complete legal text or a brief description with a link to the full document","example":"By using this service, you agree to our standard terms of service including data usage policies and service level agreements"},"order":{"type":"integer","format":"int32","description":"Display order for multiple terms documents. Lower numbers appear first. Used when a product has multiple terms documents that should be presented in a specific sequence","example":1}},"required":["link","order","terms"]},"Tier_Read":{"type":"object","description":"Volume-based pricing tier that defines different rates based on usage levels. Tiers enable graduated or volume pricing where the rate changes as usage increases. Each tier specifies a usage range and corresponding pricing. Tiers are primarily used within RatingAggregation for modern usage-based billing. They also appear in PeriodChargeResource to show which tier was applied to a specific charge","properties":{"id":{"type":["string","null"],"description":"The unique identifier of the pricing tier","example":"af75417c71d24e708f506596ce5ab675","readOnly":true},"name":{"type":"string","description":"The name of the pricing tier for identification and display purposes","example":"First 1000 units"},"startingFrom":{"type":["number","null"],"description":"The lower bound of the usage range for this tier (inclusive). For example, 0 for the first tier, 1000 for the second tier. If null, starts from 0","example":1000},"upTo":{"type":["number","null"],"description":"The upper bound of the usage range for this tier (exclusive). For example, 1000 means this tier applies up to but not including 1000 units. If null, this tier has no upper limit","example":5000},"unitAmount":{"type":["number","null"],"description":"The per-unit price for usage within this tier. For example, $0.10 per API call for the first 1000 calls. Used for usage-based pricing","example":0.1},"flatAmount":{"type":["number","null"],"description":"A fixed charge applied when usage reaches this tier. For example, a $100 base fee for the 1000-5000 unit tier. Can be combined with unitAmount","example":100}},"required":["name"]},"CreateOrgUnitRequest_Read":{"type":"object","description":"Request to create an org unit. Always created with source=MANUAL; CSV import and directory sync create units through other paths.","properties":{"name":{"type":"string","description":"Org unit name, unique among siblings under the same parent","example":"Payments"},"parentId":{"type":["integer","null"],"format":"int64","description":"Parent org unit id; omit or null to create a root unit"},"externalRef":{"type":["string","null"],"description":"Optional external reference id for cross-referencing with a synced source"}}},"OrgUnitResponse_Read":{"type":"object","description":"A node in the org-unit tree (surfaced in the UI as \"Department\" / \"Org Unit\")","properties":{"id":{"type":"integer","format":"int64","description":"Org unit id","example":173},"name":{"type":"string","description":"Org unit name","example":"Payments"},"parentId":{"type":["integer","null"],"format":"int64","description":"Parent org unit id, null for a root unit","example":40},"path":{"type":"string","description":"Materialized ancestor-id path, including self","example":"/12/40/173/"},"source":{"type":"string","description":"How this org unit was created","enum":["SYNCED","MANUAL","CSV"],"example":"MANUAL"},"externalRef":{"type":["string","null"],"description":"External reference id (set when source=SYNCED)","example":"entra-group-8842"}}},"CsvImportReport_Read":{"type":"object","description":"Result of a CSV org-unit import (or a dry-run validation pass)","properties":{"rowsProcessed":{"type":"integer","format":"int32","description":"Number of data rows read from the file (excludes the header row)","example":42},"unitsCreated":{"type":"array","description":"Org units created to satisfy org_unit_path values, as \"name (path)\"","items":{"type":"string"}},"membershipsCreated":{"type":"integer","format":"int32","description":"Number of new primary membership rows opened","example":40},"membershipsUnchanged":{"type":"integer","format":"int32","description":"Number of rows whose target membership already matched — no row was written","example":2},"personsCreated":{"type":"array","description":"Emails for which a new DirectoryPerson (source=csv) was created because no existing person or link matched; no operational User is ever created","items":{"type":"string"}},"errors":{"type":"array","description":"Rows that could not be processed, with the 1-based line number and reason","items":{"$ref":"#/components/schemas/CsvImportRowError_Read"}}}},"CsvImportRowError_Read":{"type":"object","description":"A single CSV row that could not be imported","properties":{"line":{"type":"integer","format":"int32","description":"1-based line number in the uploaded file (header is line 1)","example":5},"message":{"type":"string","description":"Human-readable reason the row was rejected"}}},"MeteringElementDefinitionResource":{"type":"object","description":"metering-element-definition","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"metering_element_definition","readOnly":true},"label":{"type":"string","description":"The metering element's label (automatically set to the element name for display purposes)","example":"country","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the metering element definition","example":"definition one"},"description":{"type":["string","null"],"description":"The description of the metering element definition","example":"description one"},"type":{"type":"string","description":"The type of the metering element definition","enum":["STRING","NUMBER"],"example":"NUMBER"},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this metering element definition","example":"a91XJp","writeOnly":true},"isSystem":{"type":"boolean","description":"Indicates whether this is a system-provided metering element that cannot be deleted","example":false,"readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["name","teamId","type"]},"JobResource":{"type":"object","description":"Job representing an agentic workflow execution instance","properties":{"id":{"type":"string","description":"Revenium generated ID (URL-safe encoded string)","example":"JMwX9g4","readOnly":true},"label":{"type":"string","description":"Display label (name or agenticJobId)","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"job","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2025-01-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2025-01-01T00:05:00Z","readOnly":true},"agenticJobId":{"type":"string","description":"Original telemetry job identifier","example":"loan-app-12345","readOnly":true},"name":{"type":["string","null"],"description":"Human-readable name for the job","example":"Process Loan Application #123","readOnly":true},"type":{"type":["string","null"],"description":"Job type category (normalized to lowercase)","example":"loan-processing","readOnly":true},"version":{"type":["string","null"],"description":"Job version for tracking evolution","example":"1.2.0","readOnly":true},"environment":{"type":["string","null"],"description":"Environment where the job executed (e.g., production, staging)","example":"production","readOnly":true},"source":{"type":"string","description":"How the job was created: TELEMETRY, UI, or API","enum":["TELEMETRY","UI","API"],"example":"TELEMETRY","readOnly":true},"executionStatus":{"type":["string","null"],"description":"Execution status of a completed job: SUCCESS, FAILED, or CANCELLED","enum":["SUCCESS","FAILED","CANCELLED"],"example":"SUCCESS","readOnly":true},"outcomeType":{"type":["string","null"],"description":"Business outcome type: CONVERTED, ESCALATED, DEFLECTED, UNSUCCESSFUL, or CUSTOM","enum":["CONVERTED","ESCALATED","DEFLECTED","UNSUCCESSFUL","CUSTOM"],"example":"CONVERTED","readOnly":true},"outcomeValue":{"type":["number","null"],"description":"Monetary value of the outcome","example":150,"readOnly":true},"outcomeCurrency":{"type":["string","null"],"description":"Currency for the outcome value (ISO 4217)","example":"USD","readOnly":true},"outcomeReportedAt":{"type":["string","null"],"description":"When the outcome was reported (ISO 8601 extended date-time format)","example":"2025-01-01T00:10:00Z","readOnly":true},"outcomeMetadata":{"type":["string","null"],"description":"Additional outcome metadata as JSON","example":{"notes":"Customer signed contract"},"readOnly":true},"outcomeReason":{"type":["string","null"],"description":"Human-readable explanation of the outcome — why the job failed or was cancelled. Null when no reason was supplied.","example":"Upstream Hermes agent timed out after 300s","readOnly":true},"hasOutcome":{"type":"boolean","description":"Whether the job has a reported outcome","example":true,"readOnly":true},"outcomeUpdateCount":{"type":"integer","format":"int32","description":"Number of updates beyond the initial outcome report","example":0,"readOnly":true},"outcomeUpdatedAt":{"type":["string","null"],"description":"When the outcome was last updated (ISO 8601). Null if never updated.","example":"2025-06-15T14:30:00Z","readOnly":true},"outcomeUpdatedBy":{"type":["string","null"],"description":"Who last updated the outcome. Null if never updated.","example":"crm-integration","readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["agenticJobId","hasOutcome","id","label","outcomeUpdateCount","resourceType","source"]},"JobResource_Read":{"type":"object","description":"Job representing an agentic workflow execution instance","properties":{"id":{"type":"string","description":"Revenium generated ID (URL-safe encoded string)","example":"JMwX9g4","readOnly":true},"label":{"type":"string","description":"Display label (name or agenticJobId)","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"job","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2025-01-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2025-01-01T00:05:00Z","readOnly":true},"agenticJobId":{"type":"string","description":"Original telemetry job identifier","example":"loan-app-12345","readOnly":true},"name":{"type":["string","null"],"description":"Human-readable name for the job","example":"Process Loan Application #123","readOnly":true},"type":{"type":["string","null"],"description":"Job type category (normalized to lowercase)","example":"loan-processing","readOnly":true},"version":{"type":["string","null"],"description":"Job version for tracking evolution","example":"1.2.0","readOnly":true},"environment":{"type":["string","null"],"description":"Environment where the job executed (e.g., production, staging)","example":"production","readOnly":true},"source":{"type":"string","description":"How the job was created: TELEMETRY, UI, or API","enum":["TELEMETRY","UI","API"],"example":"TELEMETRY","readOnly":true},"executionStatus":{"type":["string","null"],"description":"Execution status of a completed job: SUCCESS, FAILED, or CANCELLED","enum":["SUCCESS","FAILED","CANCELLED"],"example":"SUCCESS","readOnly":true},"outcomeType":{"type":["string","null"],"description":"Business outcome type: CONVERTED, ESCALATED, DEFLECTED, UNSUCCESSFUL, or CUSTOM","enum":["CONVERTED","ESCALATED","DEFLECTED","UNSUCCESSFUL","CUSTOM"],"example":"CONVERTED","readOnly":true},"outcomeValue":{"type":["number","null"],"description":"Monetary value of the outcome","example":150,"readOnly":true},"outcomeCurrency":{"type":["string","null"],"description":"Currency for the outcome value (ISO 4217)","example":"USD","readOnly":true},"outcomeReportedAt":{"type":["string","null"],"description":"When the outcome was reported (ISO 8601 extended date-time format)","example":"2025-01-01T00:10:00Z","readOnly":true},"outcomeMetadata":{"type":["string","null"],"description":"Additional outcome metadata as JSON","example":{"notes":"Customer signed contract"},"readOnly":true},"outcomeReason":{"type":["string","null"],"description":"Human-readable explanation of the outcome — why the job failed or was cancelled. Null when no reason was supplied.","example":"Upstream Hermes agent timed out after 300s","readOnly":true},"hasOutcome":{"type":"boolean","description":"Whether the job has a reported outcome","example":true,"readOnly":true},"outcomeUpdateCount":{"type":"integer","format":"int32","description":"Number of updates beyond the initial outcome report","example":0,"readOnly":true},"outcomeUpdatedAt":{"type":["string","null"],"description":"When the outcome was last updated (ISO 8601). Null if never updated.","example":"2025-06-15T14:30:00Z","readOnly":true},"outcomeUpdatedBy":{"type":["string","null"],"description":"Who last updated the outcome. Null if never updated.","example":"crm-integration","readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["agenticJobId","hasOutcome","id","label","outcomeUpdateCount","resourceType","source"]},"ReportOutcomeRequest_Read":{"type":"object","description":"Request to report a job outcome","properties":{"executionStatus":{"type":"string","description":"Execution status of the completed job","enum":["SUCCESS","FAILED","CANCELLED"],"example":"SUCCESS"},"outcomeType":{"type":["string","null"],"description":"Business outcome type","enum":["CONVERTED","ESCALATED","DEFLECTED","UNSUCCESSFUL","CUSTOM"],"example":"CONVERTED"},"outcomeValue":{"type":["number","null"],"description":"Monetary value of the outcome","example":150},"outcomeCurrency":{"type":["string","null"],"description":"Currency for the outcome value. Defaults to USD.","enum":["USD","EUR","CAD","GBP","JPY","CNY","MXN","COP","ARS","ZMW","AUD","ZWG"],"example":"USD"},"metadata":{"type":["string","null"],"description":"Additional outcome metadata as JSON string","example":{"notes":"Customer signed contract"}},"outcomeReason":{"type":["string","null"],"description":"Human-readable explanation of the outcome — why the job failed or was cancelled. This is the prescribed field for a failure reason; do not encode it inside `metadata`.","example":"Upstream Hermes agent timed out after 300s"},"reportedBy":{"type":["string","null"],"description":"Identifier of who reported the outcome (user ID or API key). Auto-set if not provided.","example":"crm-integration"}},"required":["executionStatus"]},"PaymentCorrectionRequest":{"type":"object","description":"Payment correction details to apply to the invoice.","properties":{"paymentDate":{"type":"integer","format":"int64","description":"Date of the payment as a Unix epoch (milliseconds).","example":1736899200000},"currency":{"type":"string","description":"ISO-4217 currency code for the payment.","example":"USD"},"amount":{"type":"number","description":"Amount of the payment in the given currency.","example":18.25},"paymentMethod":{"type":"string","description":"Method used for the payment.","enum":["CARD","CASH"],"example":"CARD"}},"required":["amount","currency","paymentDate","paymentMethod"]},"InvoiceResource":{"type":"object","description":"Invoice for API usage and subscription charges. Tracks billing periods, line items, payments, and account status for customer invoicing","properties":{"id":{"type":"string","description":"The unique identifier of the invoice","example":"Rl31jE","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"invoice","readOnly":true},"label":{"type":"string","description":"The invoice's label (automatically set to the invoice number for display purposes)","example":"INV-2024-001","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp in ISO 8601 extended date-time format","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The last update timestamp in ISO 8601 extended date-time format","example":"2024-09-01T00:00:00Z","readOnly":true},"product":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"subscription":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"organization":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"subscriptionOwner":{"$ref":"#/components/schemas/ResourceMetadata","description":"The user who owns the subscription associated with this invoice","readOnly":true},"team":{"$ref":"#/components/schemas/ResourceMetadata","description":"The team that owns the product being billed","readOnly":true},"account":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"accountState":{"type":["string","null"],"description":"The current state of the billing account","enum":["CREATED","ACTIVATED","SUSPENDED","CLOSED"],"example":"ACTIVATED","readOnly":true},"state":{"type":["string","null"],"description":"The current state of the invoice in its lifecycle","enum":["DRAFT","FINALIZED","CLOSED","ISSUED","PAID","PARTIALLY_PAID"],"example":"ISSUED","readOnly":true},"accountNumber":{"type":["string","null"],"description":"The account number for the billing account","example":"ACC-12345","readOnly":true},"accountReliefState":{"type":["string","null"],"description":"The relief state of the billing account indicating if payment relief has been requested or granted","example":"REQUESTED","readOnly":true},"startDate":{"type":"string","description":"The start date of the billing period covered by this invoice in ISO 8601 extended date-time format","example":"2024-09-01T00:00:00Z","readOnly":true},"endDate":{"type":["string","null"],"description":"The end date of the billing period covered by this invoice in ISO 8601 extended date-time format","example":"2024-09-30T23:59:59Z","readOnly":true},"totalAmount":{"type":"number","description":"The total amount charged on this invoice before adjustments","example":1000,"readOnly":true},"totalAdjusted":{"type":"number","description":"The total amount after applying refunds and tax adjustments","example":950,"readOnly":true},"totalCallCount":{"type":"integer","format":"int64","description":"The total number of API calls included in this invoice","example":1000,"readOnly":true},"totalFreeCallCount":{"type":"integer","format":"int64","description":"The number of API calls that were included in the subscription quota and not charged","example":100,"readOnly":true},"totalRefund":{"type":"number","description":"The total amount refunded on this invoice","example":50,"readOnly":true},"invoiceJobId":{"type":["string","null"],"description":"The internal job identifier used to generate this invoice","example":"job-1234","readOnly":true},"paymentProvider":{"type":["string","null"],"description":"The payment provider used to process payment for this invoice","enum":["STRIPE"],"example":"STRIPE","readOnly":true},"invoiceNumber":{"type":["string","null"],"description":"The human-readable invoice number for customer reference","example":"INV-2024-001","readOnly":true},"currency":{"type":"string","description":"The currency code for all amounts on this invoice","enum":["USD","EUR","CAD","GBP","JPY","CNY","MXN","COP","ARS","ZMW","AUD","ZWG"],"example":"USD","readOnly":true},"invoicePayStatus":{"type":["string","null"],"description":"The payment status of the invoice indicating whether payment has been received","enum":["PAID","UNPAID","PARTIALLY_PAID","OVER_PAID","INVOICE_ONLY"],"example":"PAID","readOnly":true},"totalPaidAmount":{"type":["number","null"],"description":"The total amount that has been paid toward this invoice","example":950,"readOnly":true},"paymentSource":{"type":"string","description":"The source of payment for this invoice indicating how payment was processed","enum":["EXTERNAL_PAYMENT_NOTIFICATION","PAYMENT_VIA_PAYMENT_PROVIDER","INVOICE_ONLY_NO_PAYMENT"],"example":"PAYMENT_VIA_PAYMENT_PROVIDER","readOnly":true},"issued":{"type":["string","null"],"description":"The date when the invoice was issued to the customer in ISO 8601 extended date-time format","example":"2024-09-30T23:59:59Z","readOnly":true},"finalized":{"type":["string","null"],"description":"The date when the invoice was finalized and locked from further changes in ISO 8601 extended date-time format","example":"2024-09-30T23:59:59Z","readOnly":true},"isDemo":{"type":["boolean","null"],"description":"Indicates whether this is a demo invoice for trial or testing purposes","example":false,"readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["currency","label","paymentSource","resourceType","startDate","subscriptionOwner","team","totalAdjusted","totalAmount","totalCallCount","totalFreeCallCount","totalRefund"]},"GitlabUserMappingPayload":{"type":"object","properties":{"userEmail":{"type":"string"},"gitlabUsername":{"type":"string"}}},"GitlabUserMappingResponse_Read":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"userEmail":{"type":"string"},"gitlabUsername":{"type":["string","null"]},"gitlabUserId":{"type":["integer","null"],"format":"int64"},"manualOverride":{"type":"boolean"},"resolutionStatus":{"type":"string"},"resolutionMethod":{"type":["string","null"]},"lastResolvedAt":{"type":["string","null"],"format":"date-time"}}},"GithubUserMappingPayload":{"type":"object","properties":{"userEmail":{"type":"string"},"githubLogin":{"type":"string"}}},"GithubUserMappingResponse_Read":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"userEmail":{"type":"string"},"githubLogin":{"type":["string","null"]},"manualOverride":{"type":"boolean"},"resolutionStatus":{"type":"string"},"lastResolvedAt":{"type":["string","null"],"format":"date-time"}}},"UpsertDirectoryLinkRequest":{"type":"object","description":"Manual email-to-directory-person mapping upsert","properties":{"userEmail":{"type":"string","description":"Subscriber email address to map","example":"ash@weyland-yutani.io"},"directoryPersonId":{"type":["integer","null"],"format":"int64","description":"DirectoryPerson id to resolve the email to. Omit or null to record the email as an explicit manual UNRESOLVED override (e.g. to suppress a bad auto-match).","example":42}}},"DirectoryLinkResponse_Read":{"type":"object","description":"Manual override mapping a subscriber email to a resolved DirectoryPerson — the directory-sync analog of a Github user mapping","properties":{"id":{"type":"integer","format":"int64","description":"Mapping id","example":551},"userEmail":{"type":"string","description":"Subscriber email address (stored lowercase)","example":"ash@weyland-yutani.io"},"directoryPersonId":{"type":["integer","null"],"format":"int64","description":"Resolved DirectoryPerson id, null when unresolved"},"manualOverride":{"type":"boolean","description":"True for manually-created/edited mappings; these are never overridden by directory sync","example":true},"resolutionStatus":{"type":"string","description":"Resolution state of this mapping","enum":["UNRESOLVED","RESOLVED"],"example":"RESOLVED"},"lastResolvedAt":{"type":["string","null"],"format":"date-time","description":"When this mapping was last (re)resolved","example":"2024-01-15T10:30:00Z"}}},"IntegrationCredentialPayload":{"type":"object","properties":{"integrationType":{"type":"string"},"credentialName":{"type":"string"},"token":{"type":"string"},"metadata":{"type":["object","null"],"additionalProperties":{}}}},"IntegrationCredentialResponse_Read":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"integrationType":{"type":"string"},"credentialName":{"type":"string"},"validationStatus":{"type":["string","null"]},"validationError":{"type":["string","null"]},"lastValidatedAt":{"type":["string","null"],"format":"date-time"},"metadata":{"type":["object","null"],"additionalProperties":{}}}},"GithubReposRequest":{"type":"object","properties":{"orgName":{"type":"string"},"token":{"type":["string","null"]},"credentialId":{"type":["integer","null"],"format":"int64"}}},"GithubRepoResponse_Read":{"type":"object","properties":{"fullName":{"type":"string"},"private":{"type":"boolean"}}},"CredentialResource_Read":{"type":"object","description":"credential","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"credential","readOnly":true},"label":{"type":"string","description":"The credential's label (automatically set to the application name for display purposes)","example":"my-awesome-credential","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the credential","example":"Invoice API Credential (Staging)"},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this credential","example":"a91XJp","writeOnly":true},"organization":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"organizationId":{"type":["string","null"],"description":"The unique identifier of the organization that owns this credential","example":"6PV0xe","writeOnly":true},"subscriber":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscriberId":{"type":["string","null"],"description":"The unique identifier of the subscriber who owns this credential","example":"pEjxgX","writeOnly":true},"externalId":{"type":"string","description":"The external id of the credential","example":"d91450df5a74492cb5fa0ccadec26987"},"externalSecret":{"type":["string","null"],"description":"The external secret of the credential","example":"aklda93#Ax_As!@3414a"},"subscriptions":{"type":["array","null"],"description":"The subscriptions associated with this credential","items":{"$ref":"#/components/schemas/ResourceMetadata_Read"},"readOnly":true},"subscriptionIds":{"type":["array","null"],"description":"The subscription IDs associated with this credential","example":["sub-id-1","sub-id-2"],"items":{"type":"string"},"writeOnly":true},"tags":{"type":["array","null"],"description":"A list of tags associated with this credential. ","example":["tag1","tag2","tag3"],"items":{"type":"string"}},"identityProvider":{"type":["string","null"],"description":"The name of the identity provider","example":"Auth0"},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["externalId","name","organizationId","subscriberId","teamId"]},"CostControlFilterResource":{"type":"object","description":"A single filter predicate applied to a cost control evaluation.","properties":{"dimension":{"type":["string","null"],"description":"The AI metric dimension to match against","enum":["ORGANIZATION","CREDENTIAL","PRODUCT","MODEL","PROVIDER","AGENT","SUBSCRIBER","TASK_TYPE","WORKSPACE","API_KEY"],"example":"MODEL"},"operator":{"type":["string","null"],"description":"Comparison operator applied to the dimension value","enum":["IS","IS_NOT","CONTAINS","STARTS_WITH","ENDS_WITH"],"example":"IS"},"value":{"type":["string","null"],"description":"The value to compare against","example":"gpt-4"}},"required":["dimension","operator","value"]},"Cleared":{"allOf":[{"$ref":"#/components/schemas/PatchableDimension"}]},"CostControlResource":{"type":"object","description":"Cost control configuration for cost enforcement. Shadow mode evaluates without blocking; non-shadow rules block AI transactions when the threshold is crossed within the rolling window.","properties":{"id":{"type":"string","description":"The Revenium-generated identifier of the cost control","example":"jR2kmLs","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"cost_control","readOnly":true},"label":{"type":"string","description":"The rule's label (automatically set to the rule name for display purposes)","example":"Monthly OpenAI Cap","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2026-04-21T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2026-04-21T00:00:00Z","readOnly":true},"createdBy":{"type":["string","null"],"description":"The email address of the user who created this rule","example":"user@example.com","readOnly":true},"modifiedBy":{"type":["string","null"],"description":"The email address of the user who last modified this rule","example":"user@example.com","readOnly":true},"name":{"type":["string","null"],"description":"Display name for this rule","example":"Monthly OpenAI Cap"},"description":{"type":"null","description":"Optional human-readable description of the rule's purpose. PATCH semantics: omit the field to leave the persisted value unchanged; pass explicit JSON `null` to clear a previously-set description; pass a string to set it.","example":"Caps monthly OpenAI spend for the Growth team","oneOf":[{"$ref":"#/components/schemas/Cleared"},{"$ref":"#/components/schemas/Present"},{"$ref":"#/components/schemas/Undefined"}]},"denyMessage":{"type":"null","description":"Optional customer-authored template shown to the AI agent when this rule blocks or warns on a request. The server stores and serves this string as-is — it is never interpolated server-side; the local budget-gate client renders the following template variables before display: `{model}`, `{spent}`, `{limit}`, `{window}`, `{percentUsed}`, `{ruleName}`. Only the developer/policy text is customer-authored — the action directive shown alongside it is composed by the client, not this field. PATCH semantics: omit the field to leave the persisted value unchanged; pass explicit JSON `null` to clear a previously-set message; pass a string to set it.","example":"Blocked by {ruleName}: {spent} of {limit} used this {window}. Ask the user before retrying.","maxLength":2000,"oneOf":[{"$ref":"#/components/schemas/Cleared"},{"$ref":"#/components/schemas/Present"},{"$ref":"#/components/schemas/Undefined"}]},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The Revenium-generated identifier of the team that owns this rule","example":"a91XJp","writeOnly":true},"metricType":{"type":["string","null"],"description":"The AI metric the rule evaluates against","enum":["TOTAL_COST","TOKEN_COUNT","INPUT_TOKEN_COUNT","OUTPUT_TOKEN_COUNT","CACHED_TOKEN_COUNT","ERROR_COUNT","IMAGE_COUNT","VIDEO_COUNT","AUDIO_COUNT","CHARACTER_COUNT","CREDITS_CONSUMED"],"example":"TOTAL_COST"},"warnThreshold":{"type":"null","description":"Optional soft threshold that triggers a warning without blocking. Unit matches `hardLimit`: dollars for `TOTAL_COST`, whole counts for token/error metrics. PATCH semantics: omit the field to leave the persisted value unchanged; pass explicit JSON `null` to clear a previously-set threshold; pass a numeric value to set it.","example":8,"oneOf":[{"$ref":"#/components/schemas/Cleared"},{"$ref":"#/components/schemas/Present"},{"$ref":"#/components/schemas/Undefined"}]},"hardLimit":{"type":"null","description":"Hard enforcement threshold in the metric's native unit: **dollars** for `metricType=TOTAL_COST` (e.g. `10` = $10/window), or a whole count for `metricType=TOKEN_COUNT` / `ERROR_COUNT` / etc. When crossed and the rule is not in shadow mode, the declared `action` is executed. PATCH semantics: omit the field to leave the persisted value unchanged; pass explicit JSON `null` to clear a previously-set limit; pass a numeric value to set it.","example":10,"oneOf":[{"$ref":"#/components/schemas/Cleared"},{"$ref":"#/components/schemas/Present"},{"$ref":"#/components/schemas/Undefined"}]},"windowType":{"type":["string","null"],"description":"Rolling window over which usage is accumulated","enum":["DAILY","WEEKLY","MONTHLY","QUARTERLY"],"example":"MONTHLY"},"action":{"type":["string","null"],"description":"Enforcement action taken when `hardLimit` is crossed (and rule is not in shadow mode). Only `BLOCK` and `WARN_ONLY` are currently accepted on create/update.","enum":["BLOCK","WARN_ONLY"],"example":"BLOCK"},"shadowMode":{"type":["boolean","null"],"description":"When true, the rule evaluates without actually blocking — used to validate limits before enforcing them","example":true},"enabled":{"type":["boolean","null"],"description":"Whether the rule is active. Disabled rules are kept for history but skipped at evaluation time.","example":true},"groupBy":{"type":"null","description":"Optional dimension to partition the rule evaluation (per-model, per-provider, etc.). PATCH semantics: omit the field to leave the persisted value unchanged; pass explicit JSON `null` to clear a previously-set dimension; pass an enum value to set it.","example":"MODEL","oneOf":[{"$ref":"#/components/schemas/Cleared"},{"$ref":"#/components/schemas/Present"},{"$ref":"#/components/schemas/Undefined"}]},"filters":{"type":["array","null"],"description":"Optional filter predicates narrowing which AI metric events the rule applies to. PATCH: passing an empty list clears all filters; passing a non-empty list replaces the set.","items":{"$ref":"#/components/schemas/CostControlFilterResource"}},"notificationChannelIds":{"type":["array","null"],"description":"Optional notification channels that receive alerts when the rule fires. Each entry is a type-prefixed identifier — `slack:<hashedId>` resolves to a Slack configuration; `webhook:<hashedId>` resolves to a webhook export configuration. PATCH: passing an empty list clears all channels; passing a non-empty list replaces the set; omitting the field leaves the persisted set unchanged.","items":{"type":"string","example":"slack:a91XJp"}},"_links":{"$ref":"#/components/schemas/Links"}},"required":["action","metricType","name","teamId","windowType"]},"PatchableDimension":{"type":"object","properties":{"defined":{"type":"boolean"}}},"Present":{"allOf":[{"$ref":"#/components/schemas/PatchableDimension"},{"type":"object","properties":{"value":{}}}]},"Undefined":{"allOf":[{"$ref":"#/components/schemas/PatchableDimension"}]},"Cleared_Write":{"allOf":[{"$ref":"#/components/schemas/PatchableDimension_Write"}]},"CostControlResource_Write":{"type":"object","description":"Cost control configuration for cost enforcement. Shadow mode evaluates without blocking; non-shadow rules block AI transactions when the threshold is crossed within the rolling window.","properties":{"id":{"type":"string","description":"The Revenium-generated identifier of the cost control","example":"jR2kmLs","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"cost_control","readOnly":true},"label":{"type":"string","description":"The rule's label (automatically set to the rule name for display purposes)","example":"Monthly OpenAI Cap","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2026-04-21T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2026-04-21T00:00:00Z","readOnly":true},"createdBy":{"type":["string","null"],"description":"The email address of the user who created this rule","example":"user@example.com","readOnly":true},"modifiedBy":{"type":["string","null"],"description":"The email address of the user who last modified this rule","example":"user@example.com","readOnly":true},"name":{"type":["string","null"],"description":"Display name for this rule","example":"Monthly OpenAI Cap"},"description":{"type":"null","description":"Optional human-readable description of the rule's purpose. PATCH semantics: omit the field to leave the persisted value unchanged; pass explicit JSON `null` to clear a previously-set description; pass a string to set it.","example":"Caps monthly OpenAI spend for the Growth team","oneOf":[{"$ref":"#/components/schemas/Cleared_Write"},{"$ref":"#/components/schemas/Present_Write"},{"$ref":"#/components/schemas/Undefined_Write"}]},"denyMessage":{"type":"null","description":"Optional customer-authored template shown to the AI agent when this rule blocks or warns on a request. The server stores and serves this string as-is — it is never interpolated server-side; the local budget-gate client renders the following template variables before display: `{model}`, `{spent}`, `{limit}`, `{window}`, `{percentUsed}`, `{ruleName}`. Only the developer/policy text is customer-authored — the action directive shown alongside it is composed by the client, not this field. PATCH semantics: omit the field to leave the persisted value unchanged; pass explicit JSON `null` to clear a previously-set message; pass a string to set it.","example":"Blocked by {ruleName}: {spent} of {limit} used this {window}. Ask the user before retrying.","maxLength":2000,"oneOf":[{"$ref":"#/components/schemas/Cleared_Write"},{"$ref":"#/components/schemas/Present_Write"},{"$ref":"#/components/schemas/Undefined_Write"}]},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Write"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The Revenium-generated identifier of the team that owns this rule","example":"a91XJp","writeOnly":true},"metricType":{"type":["string","null"],"description":"The AI metric the rule evaluates against","enum":["TOTAL_COST","TOKEN_COUNT","INPUT_TOKEN_COUNT","OUTPUT_TOKEN_COUNT","CACHED_TOKEN_COUNT","ERROR_COUNT","IMAGE_COUNT","VIDEO_COUNT","AUDIO_COUNT","CHARACTER_COUNT","CREDITS_CONSUMED"],"example":"TOTAL_COST"},"warnThreshold":{"type":"null","description":"Optional soft threshold that triggers a warning without blocking. Unit matches `hardLimit`: dollars for `TOTAL_COST`, whole counts for token/error metrics. PATCH semantics: omit the field to leave the persisted value unchanged; pass explicit JSON `null` to clear a previously-set threshold; pass a numeric value to set it.","example":8,"oneOf":[{"$ref":"#/components/schemas/Cleared_Write"},{"$ref":"#/components/schemas/Present_Write"},{"$ref":"#/components/schemas/Undefined_Write"}]},"hardLimit":{"type":"null","description":"Hard enforcement threshold in the metric's native unit: **dollars** for `metricType=TOTAL_COST` (e.g. `10` = $10/window), or a whole count for `metricType=TOKEN_COUNT` / `ERROR_COUNT` / etc. When crossed and the rule is not in shadow mode, the declared `action` is executed. PATCH semantics: omit the field to leave the persisted value unchanged; pass explicit JSON `null` to clear a previously-set limit; pass a numeric value to set it.","example":10,"oneOf":[{"$ref":"#/components/schemas/Cleared_Write"},{"$ref":"#/components/schemas/Present_Write"},{"$ref":"#/components/schemas/Undefined_Write"}]},"windowType":{"type":["string","null"],"description":"Rolling window over which usage is accumulated","enum":["DAILY","WEEKLY","MONTHLY","QUARTERLY"],"example":"MONTHLY"},"action":{"type":["string","null"],"description":"Enforcement action taken when `hardLimit` is crossed (and rule is not in shadow mode). Only `BLOCK` and `WARN_ONLY` are currently accepted on create/update.","enum":["BLOCK","WARN_ONLY"],"example":"BLOCK"},"shadowMode":{"type":["boolean","null"],"description":"When true, the rule evaluates without actually blocking — used to validate limits before enforcing them","example":true},"enabled":{"type":["boolean","null"],"description":"Whether the rule is active. Disabled rules are kept for history but skipped at evaluation time.","example":true},"groupBy":{"type":"null","description":"Optional dimension to partition the rule evaluation (per-model, per-provider, etc.). PATCH semantics: omit the field to leave the persisted value unchanged; pass explicit JSON `null` to clear a previously-set dimension; pass an enum value to set it.","example":"MODEL","oneOf":[{"$ref":"#/components/schemas/Cleared_Write"},{"$ref":"#/components/schemas/Present_Write"},{"$ref":"#/components/schemas/Undefined_Write"}]},"filters":{"type":["array","null"],"description":"Optional filter predicates narrowing which AI metric events the rule applies to. PATCH: passing an empty list clears all filters; passing a non-empty list replaces the set.","items":{"$ref":"#/components/schemas/CostControlFilterResource"}},"notificationChannelIds":{"type":["array","null"],"description":"Optional notification channels that receive alerts when the rule fires. Each entry is a type-prefixed identifier — `slack:<hashedId>` resolves to a Slack configuration; `webhook:<hashedId>` resolves to a webhook export configuration. PATCH: passing an empty list clears all channels; passing a non-empty list replaces the set; omitting the field leaves the persisted set unchanged.","items":{"type":"string","example":"slack:a91XJp"}},"_links":{"$ref":"#/components/schemas/Links"}},"required":["action","metricType","name","teamId","windowType"]},"PatchableDimension_Write":{"type":"object","properties":{"defined":{"type":"boolean"}}},"Present_Write":{"allOf":[{"$ref":"#/components/schemas/PatchableDimension_Write"},{"type":"object","properties":{"value":{}}}]},"Undefined_Write":{"allOf":[{"$ref":"#/components/schemas/PatchableDimension_Write"}]},"Cleared_Read":{"allOf":[{"$ref":"#/components/schemas/PatchableDimension_Read"}]},"CostControlResource_Read":{"type":"object","description":"Cost control configuration for cost enforcement. Shadow mode evaluates without blocking; non-shadow rules block AI transactions when the threshold is crossed within the rolling window.","properties":{"id":{"type":"string","description":"The Revenium-generated identifier of the cost control","example":"jR2kmLs","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"cost_control","readOnly":true},"label":{"type":"string","description":"The rule's label (automatically set to the rule name for display purposes)","example":"Monthly OpenAI Cap","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2026-04-21T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2026-04-21T00:00:00Z","readOnly":true},"createdBy":{"type":["string","null"],"description":"The email address of the user who created this rule","example":"user@example.com","readOnly":true},"modifiedBy":{"type":["string","null"],"description":"The email address of the user who last modified this rule","example":"user@example.com","readOnly":true},"name":{"type":["string","null"],"description":"Display name for this rule","example":"Monthly OpenAI Cap"},"description":{"type":"null","description":"Optional human-readable description of the rule's purpose. PATCH semantics: omit the field to leave the persisted value unchanged; pass explicit JSON `null` to clear a previously-set description; pass a string to set it.","example":"Caps monthly OpenAI spend for the Growth team","oneOf":[{"$ref":"#/components/schemas/Cleared_Read"},{"$ref":"#/components/schemas/Present_Read"},{"$ref":"#/components/schemas/Undefined_Read"}]},"denyMessage":{"type":"null","description":"Optional customer-authored template shown to the AI agent when this rule blocks or warns on a request. The server stores and serves this string as-is — it is never interpolated server-side; the local budget-gate client renders the following template variables before display: `{model}`, `{spent}`, `{limit}`, `{window}`, `{percentUsed}`, `{ruleName}`. Only the developer/policy text is customer-authored — the action directive shown alongside it is composed by the client, not this field. PATCH semantics: omit the field to leave the persisted value unchanged; pass explicit JSON `null` to clear a previously-set message; pass a string to set it.","example":"Blocked by {ruleName}: {spent} of {limit} used this {window}. Ask the user before retrying.","maxLength":2000,"oneOf":[{"$ref":"#/components/schemas/Cleared_Read"},{"$ref":"#/components/schemas/Present_Read"},{"$ref":"#/components/schemas/Undefined_Read"}]},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The Revenium-generated identifier of the team that owns this rule","example":"a91XJp","writeOnly":true},"metricType":{"type":["string","null"],"description":"The AI metric the rule evaluates against","enum":["TOTAL_COST","TOKEN_COUNT","INPUT_TOKEN_COUNT","OUTPUT_TOKEN_COUNT","CACHED_TOKEN_COUNT","ERROR_COUNT","IMAGE_COUNT","VIDEO_COUNT","AUDIO_COUNT","CHARACTER_COUNT","CREDITS_CONSUMED"],"example":"TOTAL_COST"},"warnThreshold":{"type":"null","description":"Optional soft threshold that triggers a warning without blocking. Unit matches `hardLimit`: dollars for `TOTAL_COST`, whole counts for token/error metrics. PATCH semantics: omit the field to leave the persisted value unchanged; pass explicit JSON `null` to clear a previously-set threshold; pass a numeric value to set it.","example":8,"oneOf":[{"$ref":"#/components/schemas/Cleared_Read"},{"$ref":"#/components/schemas/Present_Read"},{"$ref":"#/components/schemas/Undefined_Read"}]},"hardLimit":{"type":"null","description":"Hard enforcement threshold in the metric's native unit: **dollars** for `metricType=TOTAL_COST` (e.g. `10` = $10/window), or a whole count for `metricType=TOKEN_COUNT` / `ERROR_COUNT` / etc. When crossed and the rule is not in shadow mode, the declared `action` is executed. PATCH semantics: omit the field to leave the persisted value unchanged; pass explicit JSON `null` to clear a previously-set limit; pass a numeric value to set it.","example":10,"oneOf":[{"$ref":"#/components/schemas/Cleared_Read"},{"$ref":"#/components/schemas/Present_Read"},{"$ref":"#/components/schemas/Undefined_Read"}]},"windowType":{"type":["string","null"],"description":"Rolling window over which usage is accumulated","enum":["DAILY","WEEKLY","MONTHLY","QUARTERLY"],"example":"MONTHLY"},"action":{"type":["string","null"],"description":"Enforcement action taken when `hardLimit` is crossed (and rule is not in shadow mode). Only `BLOCK` and `WARN_ONLY` are currently accepted on create/update.","enum":["BLOCK","WARN_ONLY"],"example":"BLOCK"},"shadowMode":{"type":["boolean","null"],"description":"When true, the rule evaluates without actually blocking — used to validate limits before enforcing them","example":true},"enabled":{"type":["boolean","null"],"description":"Whether the rule is active. Disabled rules are kept for history but skipped at evaluation time.","example":true},"groupBy":{"type":"null","description":"Optional dimension to partition the rule evaluation (per-model, per-provider, etc.). PATCH semantics: omit the field to leave the persisted value unchanged; pass explicit JSON `null` to clear a previously-set dimension; pass an enum value to set it.","example":"MODEL","oneOf":[{"$ref":"#/components/schemas/Cleared_Read"},{"$ref":"#/components/schemas/Present_Read"},{"$ref":"#/components/schemas/Undefined_Read"}]},"filters":{"type":["array","null"],"description":"Optional filter predicates narrowing which AI metric events the rule applies to. PATCH: passing an empty list clears all filters; passing a non-empty list replaces the set.","items":{"$ref":"#/components/schemas/CostControlFilterResource"}},"notificationChannelIds":{"type":["array","null"],"description":"Optional notification channels that receive alerts when the rule fires. Each entry is a type-prefixed identifier — `slack:<hashedId>` resolves to a Slack configuration; `webhook:<hashedId>` resolves to a webhook export configuration. PATCH: passing an empty list clears all channels; passing a non-empty list replaces the set; omitting the field leaves the persisted set unchanged.","items":{"type":"string","example":"slack:a91XJp"}},"_links":{"$ref":"#/components/schemas/Links"}},"required":["action","metricType","name","teamId","windowType"]},"PatchableDimension_Read":{"type":"object","properties":{"defined":{"type":"boolean"}}},"Present_Read":{"allOf":[{"$ref":"#/components/schemas/PatchableDimension_Read"},{"type":"object","properties":{"value":{}}}]},"Undefined_Read":{"allOf":[{"$ref":"#/components/schemas/PatchableDimension_Read"}]},"AheadBehindLinearResource":{"type":"object","description":"Linear expectation tracking vs actual progress","properties":{"expectedByNow":{"type":"number","description":"Expected value by now based on linear pacing","example":500},"delta":{"type":"number","description":"Delta from linear expectation (positive = ahead, negative = behind)","example":250.5},"status":{"type":"string","description":"Status vs linear expectation","enum":["AHEAD","ON_TRACK","BEHIND"],"example":"AHEAD"}}},"BudgetProgressResource":{"type":"object","description":"Budget progress for a single anomaly","properties":{"anomalyId":{"type":"integer","format":"int64","description":"Anomaly identifier","example":12345},"metricType":{"type":"string","description":"Metric type being tracked","enum":["TOTAL_COST","COST_PER_TRANSACTION","TOKENS_PER_MINUTE","TOKEN_COUNT","INPUT_TOKEN_COUNT","OUTPUT_TOKEN_COUNT","CACHED_TOKEN_COUNT","TOKENS_PER_REQUEST","TIME_TO_FIRST_TOKEN","DURATION","ERROR_COUNT","ERROR_RATE","REQUESTS_PER_MINUTE","IMAGE_COUNT","DURATION_SECONDS","CHARACTER_COUNT","CREDITS_CONSUMED","COST_PER_IMAGE","COST_PER_SECOND","VIDEO_COUNT","AUDIO_COUNT"],"example":"TOTAL_COST"},"threshold":{"type":"number","description":"Budget threshold value","example":1000},"currentValue":{"type":"number","description":"Current cumulative value in the window","example":750.5},"remaining":{"type":["number","null"],"description":"Remaining budget (threshold - currentValue), null if threshold is zero","example":249.5},"percentUsed":{"type":["number","null"],"description":"Percentage of budget used (currentValue / threshold), null if threshold is zero","example":0.7505},"window":{"$ref":"#/components/schemas/BudgetWindowResource","description":"Budget window boundaries"},"aheadBehindVsLinear":{"$ref":"#/components/schemas/AheadBehindLinearResource","description":"Ahead/behind vs linear expectation"}}},"BudgetWindowResource":{"type":"object","description":"Budget window time boundaries","properties":{"start":{"type":"string","format":"date-time","description":"Window start time (UTC)","example":"2025-10-01T00:00:00Z"},"now":{"type":"string","format":"date-time","description":"Current time for progress calculation (UTC)","example":"2025-10-15T14:30:00Z"},"endExpected":{"type":"string","format":"date-time","description":"Expected window end time (UTC)","example":"2025-10-31T23:59:59.999999999Z"}}},"BudgetGroupResult":{"type":"object","description":"Budget progress for a single group within a grouped anomaly","properties":{"groupValue":{"type":"string","description":"Group dimension value","example":"acme-corp"},"groupDisplayName":{"type":"string","description":"Human-readable group name","example":"Acme Corporation"},"currentValue":{"type":"number","description":"Current cumulative value for this group","example":450.25},"remaining":{"type":["number","null"],"description":"Remaining budget for this group, null if threshold is zero","example":549.75},"percentUsed":{"type":["number","null"],"description":"Percentage of budget used for this group, null if threshold is zero","example":0.4503}}},"GroupedBudgetProgressResource":{"type":"object","description":"Budget progress for a grouped anomaly with per-group breakdown","properties":{"anomalyId":{"type":"integer","format":"int64","description":"Anomaly identifier","example":12345},"metricType":{"type":"string","description":"Metric type being tracked","enum":["TOTAL_COST","COST_PER_TRANSACTION","TOKENS_PER_MINUTE","TOKEN_COUNT","INPUT_TOKEN_COUNT","OUTPUT_TOKEN_COUNT","CACHED_TOKEN_COUNT","TOKENS_PER_REQUEST","TIME_TO_FIRST_TOKEN","DURATION","ERROR_COUNT","ERROR_RATE","REQUESTS_PER_MINUTE","IMAGE_COUNT","DURATION_SECONDS","CHARACTER_COUNT","CREDITS_CONSUMED","COST_PER_IMAGE","COST_PER_SECOND","VIDEO_COUNT","AUDIO_COUNT"],"example":"TOTAL_COST"},"threshold":{"type":"number","description":"Budget threshold value applied to each group","example":1000},"window":{"$ref":"#/components/schemas/BudgetWindowResource","description":"Budget window boundaries"},"groups":{"type":"array","description":"Per-group budget progress results","items":{"$ref":"#/components/schemas/BudgetGroupResult"}}}},"AgentResource":{"type":"object","description":"An AI agent registered for an organization","properties":{"id":{"type":"string","description":"The unique identifier of the agent","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"agent","readOnly":true},"label":{"type":"string","description":"The agent's display name","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"telemetryKey":{"type":["string","null"],"description":"The exact string sent in the `agent` field of telemetry. Matched case-insensitively and unique per organization. Immutable after creation","example":"marketing-agent"},"displayName":{"type":["string","null"],"description":"Human-readable name for the agent. Defaults to the telemetry key when omitted","example":"Marketing Agent"},"source":{"type":["string","null"],"description":"How the agent record was created","enum":["TELEMETRY","UI","API"],"example":"API","readOnly":true},"owner":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"ownerId":{"type":["string","null"],"description":"The unique identifier of the user who owns this agent. Omit to leave the owner unchanged on update; a set owner cannot be cleared","example":"af75417c71d24e708f506596ce5ab675","writeOnly":true},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The team identifier. Required when creating an agent. Immutable after creation","writeOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["telemetryKey"]},"UpdateWorkspaceNameRequest_Read":{"type":"object","description":"Request to update workspace revenium name","properties":{"reveniumName":{"type":["string","null"],"description":"User-defined display name override (null to clear)","example":"Engineering"}}},"CreditInfo_Read":{"type":"object","properties":{"balance":{"type":["number","null"],"format":"double"},"used":{"type":["number","null"],"format":"double"},"limit":{"type":["number","null"],"format":"double"},"creditValueUsd":{"type":["number","null"],"format":"double"}}},"ModelLimits_Read":{"type":"object","properties":{"maxConcurrent":{"type":["integer","null"],"format":"int32"},"maxDaily":{"type":["integer","null"],"format":"int32"},"maxMonthly":{"type":["integer","null"],"format":"int32"}}},"ProviderTierMetadata_Read":{"type":"object","properties":{"tierName":{"type":["string","null"]},"tierLevel":{"type":["integer","null"],"format":"int32"},"monthlyLimitUsd":{"type":["number","null"],"format":"double"},"rateLimits":{"oneOf":[{"$ref":"#/components/schemas/RateLimits_Read"},{"type":"null"}]},"modelLimits":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/ModelLimits_Read"}},"credits":{"oneOf":[{"$ref":"#/components/schemas/CreditInfo_Read"},{"type":"null"}]},"features":{"oneOf":[{"$ref":"#/components/schemas/TierFeatures_Read"},{"type":"null"}]},"rawData":{"type":["object","null"],"additionalProperties":{}},"lastUpdated":{"type":["string","null"]}}},"RateLimits_Read":{"type":"object","properties":{"requestsPerMinute":{"type":["integer","null"],"format":"int32"},"requestsPerDay":{"type":["integer","null"],"format":"int32"},"tokensPerMinute":{"type":["integer","null"],"format":"int32"},"tokensPerDay":{"type":["integer","null"],"format":"int32"},"concurrentRequests":{"type":["integer","null"],"format":"int32"},"creditsPerMinute":{"type":["number","null"],"format":"double"}}},"TierFeatures_Read":{"type":"object","properties":{"historicalUsage":{"type":["boolean","null"]},"modelBreakdown":{"type":["boolean","null"]},"apiKeyTracking":{"type":["boolean","null"]},"exportCapability":{"type":["boolean","null"]},"customBranding":{"type":["boolean","null"]},"prioritySupport":{"type":["boolean","null"]}}},"WorkspaceMetadataResource_Read":{"type":"object","description":"Workspace metadata including provider identity and custom naming","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"tenant","readOnly":true},"label":{"type":"string","description":"The workspace label","example":"Development","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"provider":{"type":"string","description":"Provider identifier","enum":["anthropic","openai"],"example":"anthropic","readOnly":true},"workspaceId":{"type":"string","description":"Provider's workspace identifier","example":"wrkspc_01","readOnly":true},"providerName":{"type":"string","description":"Workspace name from provider (auto-updated)","example":"Engineering Workspace","readOnly":true},"reveniumName":{"type":["string","null"],"description":"User-defined display name override (optional)","example":"Engineering"},"displayName":{"type":"string","description":"Display name (reveniumName if set, otherwise providerName)","example":"Engineering","readOnly":true},"workspaceType":{"type":["string","null"],"description":"Workspace type or category","example":"project","readOnly":true},"firstSeenDate":{"type":"string","description":"Date when workspace was first discovered","example":"2025-09-01","readOnly":true},"lastSeenDate":{"type":"string","description":"Date when workspace was last seen in usage data","example":"2025-10-24","readOnly":true},"tierMetadata":{"oneOf":[{"$ref":"#/components/schemas/ProviderTierMetadata_Read"},{"type":"null"}]},"_links":{"$ref":"#/components/schemas/Links"}}},"StrictIngestionModeRequest_Read":{"type":"object","description":"Request to toggle strict ingestion mode for a tenant","properties":{"strictIngestionMode":{"type":"boolean","description":"Whether strict ingestion mode should be enabled for the tenant. When true, AI ingestion rejects transactions referencing unknown reference entities instead of auto-creating them.","example":true}},"required":["strictIngestionMode"]},"BillingProfile_Read":{"type":"object","description":"Billing profile configuration for a tenant account. Tracks the subscription plan tier, AI usage spending, revenue calculations, and quota status for both AI and product usage","properties":{"planType":{"type":["string","null"],"description":"The subscription plan tier for this tenant account. Determines feature access, usage quotas, and pricing","enum":["DEVELOPER","GROWTH","ENTERPRISE"],"example":"GROWTH"},"aiSpend":{"type":["number","null"],"description":"Total amount spent on AI usage (completions, embeddings, etc.) for the current billing period","example":247.83},"calculatedRevenue":{"type":["number","null"],"description":"Calculated revenue amount for this tenant based on their usage and pricing plan. Only populated when revenue calculation is enabled, products have been configured with usage-based pricing, and subscriptions have been created for those products.","example":1250},"overAIQuota":{"type":["boolean","null"],"description":"Indicates whether the tenant has exceeded their AI usage quota for the current billing period. When true, additional charges may apply or service may be restricted","example":false},"overProductQuota":{"type":["boolean","null"],"description":"Indicates whether the tenant has exceeded their product usage quota for the current billing period. When true, additional charges may apply or service may be restricted","example":false},"revenueCalculationEnabled":{"type":["boolean","null"],"description":"Indicates whether automatic revenue calculation is enabled for this tenant. When enabled, the system tracks and calculates revenue based on usage metrics","example":true},"subscriptionId":{"type":["string","null"],"description":"The unique identifier of the Revenium subscription associated with this billing profile. Links the tenant to their subscription record","example":"3By4RxL","readOnly":true},"periodStart":{"type":["string","null"],"description":"The timestamp when this billing period starts (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"periodEnd":{"type":["string","null"],"description":"The timestamp when this billing period ends (ISO 8601 extended date-time format)","example":"2024-10-01T00:00:00Z","readOnly":true}}},"TenantResource_Read":{"type":"object","description":"tenant","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"tenant","readOnly":true},"label":{"type":"string","description":"The tenant's label (automatically set to the tenant name for display purposes)","example":"Weyland-Yutani Corporation","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the tenant","example":"Weyland-Yutani Corporation","readOnly":true},"description":{"type":"string","description":"The description of the tenant","example":"Global leader in AI-powered API management and usage-based billing","readOnly":true},"profileType":{"type":["string","null"],"description":"The profile type of the tenant set by Revenium","enum":["MONETIZATION","CHARGEBACK","AI"],"example":"AI"},"billingPlan":{"type":["string","null"],"description":"The billing plan tier for the tenant set by Revenium (determines pricing and quota limits)","enum":["DEVELOPER","GROWTH","ENTERPRISE"],"example":"DEVELOPER","readOnly":true},"aiDataIngested":{"type":["boolean","null"],"description":"Whether AI usage data has been ingested for this tenant","example":false,"readOnly":true},"billingProfile":{"oneOf":[{"$ref":"#/components/schemas/BillingProfile_Read"},{"type":"null"}]},"strictIngestionMode":{"type":"boolean","description":"When true, AI ingestion rejects transactions that reference entities (Product, Subscriber, Credential, Consuming Organization) which do not already exist for this tenant, instead of auto-creating them. Defaults to false.","example":false,"readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["description","name"]},"SubscriptionPatchResource":{"type":"object","description":"Subscription modification request for updating the product associated with an existing subscription. Used for subscription upgrades, downgrades, or product changes","properties":{"productId":{"type":["string","null"],"description":"The unique identifier of the new product to associate with this subscription. The subscription will be updated to use the pricing and features of the specified product","example":"af75417c71d24e708f506596ce5ab675","writeOnly":true}},"required":["productId"]},"AIModelPatchResource":{"type":"object","description":"AI model pricing patch request for updating pricing fields on tenant-owned models. Only non-null fields will be updated.","properties":{"inputCostPerToken":{"type":["number","null"],"description":"Cost per input token in USD. Must be non-negative with at most 10 decimal places.","example":0.00001,"writeOnly":true},"outputCostPerToken":{"type":["number","null"],"description":"Cost per output token in USD. Must be non-negative with at most 10 decimal places.","example":0.00003,"writeOnly":true},"cacheCreationCostPerInputToken":{"type":["number","null"],"description":"Cost per input token for cache creation in USD. Must be non-negative with at most 10 decimal places.","example":0.0000125,"writeOnly":true},"cacheCreation1hrCostPerInputToken":{"type":["number","null"],"description":"Cost per input token for 1-hour-TTL cache creation in USD. Must be non-negative with at most 10 decimal places.","example":0.00002,"writeOnly":true},"cacheReadCostPerInputToken":{"type":["number","null"],"description":"Cost per input token for cache reads in USD. Must be non-negative with at most 10 decimal places.","example":0.000001,"writeOnly":true}}},"UpdateOrgUnitRequest_Read":{"type":"object","description":"Request to rename and/or reparent an org unit. `name` is applied whenever present. `parentId` is only applied as a reparent when `reparent=true` — this lets `parentId: null` unambiguously mean \"move to root\" rather than \"leave parent unchanged\".","properties":{"name":{"type":["string","null"],"description":"New name; omit to leave the name unchanged"},"parentId":{"type":["integer","null"],"format":"int64","description":"New parent org unit id; null moves the unit to root. Ignored unless reparent=true."},"reparent":{"type":"boolean","default":false,"description":"Set true to apply parentId as a reparent operation"}}},"UpdateOutcomeRequest_Read":{"type":"object","description":"Request to update a previously reported job outcome","properties":{"reason":{"type":["string","null"],"description":"Reason this outcome record is being changed (required for the audit trail). Not the same as `outcomeReason`, which explains the job's own failure.","example":"Hermes SDK reported a false CANCELLED due to a client-side timeout"},"executionStatus":{"type":["string","null"],"description":"Updated execution status of the completed job","enum":["SUCCESS","FAILED","CANCELLED"],"example":"SUCCESS"},"outcomeType":{"type":["string","null"],"description":"Updated business outcome type","enum":["CONVERTED","ESCALATED","DEFLECTED","UNSUCCESSFUL","CUSTOM"],"example":"CONVERTED"},"outcomeValue":{"type":["number","null"],"description":"Updated monetary value of the outcome","example":150},"outcomeCurrency":{"type":["string","null"],"description":"Updated currency for the outcome value. Defaults to USD.","enum":["USD","EUR","CAD","GBP","JPY","CNY","MXN","COP","ARS","ZMW","AUD","ZWG"],"example":"USD"},"metadata":{"type":["string","null"],"description":"Updated additional outcome metadata as JSON string","example":{"notes":"Customer churned"}},"outcomeReason":{"type":["string","null"],"description":"Updated explanation of the outcome — why the job failed or was cancelled. Omit to leave the current value untouched; send an empty string to clear it.","example":"Upstream Hermes agent timed out after 300s"}},"required":["reason"]},"PageMetadata_Read":{"type":"object","properties":{"size":{"type":"integer","format":"int64"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int64"},"number":{"type":"integer","format":"int64"}}},"PagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"objectList":{"type":"array","items":{}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"EntityModelUserResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"user","readOnly":true},"label":{"type":"string","description":"The user's label (automatically set to the email address for display purposes)","example":"ash@weyland-yutani.io","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"email":{"type":"string","description":"The email address of the user","example":"ash@weyland-yutani.io"},"firstName":{"type":["string","null"],"description":"The first name of the user","example":"Ash"},"lastName":{"type":["string","null"],"description":"The last name of the user","example":"Williams"},"phoneNumber":{"type":["string","null"],"description":"The phone number associated with the user","example":"001-718-555-5555"},"homepagePreference":{"type":["string","null"],"description":"The user's homepage preference","enum":["PRODUCTS","CUSTOMERS","INVOICES","REVENUE_DASHBOARD","PRODUCT_ANALYTICS","HISTORICAL_USAGE","API_ANALYTICS","ANALYTICS_LOGS","PRODUCT_LOGS","SYSTEM_LOGS","SUBSCRIPTIONS"],"example":"PRODUCTS"},"persona":{"type":["string","null"],"description":"The user's role-based UI persona (cxo_finance, product_leaders or platform_engineering)","enum":["cxo_finance","product_leaders","platform_engineering"],"example":"cxo_finance"},"roles":{"type":"array","description":"The roles of the user","example":["ROLE_API_CONSUMER"],"items":{"type":"string"}},"tenant":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"tenantId":{"type":["string","null"],"description":"The ID of the tenant","example":"pEjxgX","readOnly":true},"teams":{"type":["array","null"],"description":"The teams the user belongs to","items":{"$ref":"#/components/schemas/TeamMetadata_Read"},"readOnly":true},"teamIds":{"type":"array","description":"The IDs of the teams the user belongs to","example":["a91XJp"],"items":{"type":"string"},"writeOnly":true},"defaultTeamId":{"type":["string","null"],"description":"The ID of the default team/organization to load on login","example":"a91XJp"},"primaryUser":{"type":["boolean","null"],"description":"is this the primaryUser in the tenant","example":false},"subscriberId":{"type":["string","null"],"description":"The ID of the subscriber","example":"pEjxgX","readOnly":true},"redirectUrl":{"type":["string","null"],"description":"The URL to use for the magic link invitation email. If not provided, uses the platform default URL.","example":"http://localhost:8081","writeOnly":true},"scheduledForDeletionAt":{"type":["string","null"],"description":"The date when the account is scheduled for permanent deletion (ISO 8601 format). Null if not scheduled for deletion.","example":"2025-01-23T00:00:00Z","readOnly":true},"canViewPromptData":{"type":["boolean","null"],"description":"Whether the user can view captured prompt data (system prompts, messages, and responses). This flag only affects non-admin users; Tenant Administrators have implicit access regardless of this setting. Only modifiable by Tenant Administrators.","example":false},"_links":{"$ref":"#/components/schemas/Links"}},"required":["email","roles"]},"UserPagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"userResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelUserResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"EntityModelSubscriptionResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"subscription","readOnly":true},"label":{"type":"string","description":"The subscription's label (automatically set to the client's email address for display purposes)","example":"client@example.com","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the subscription","example":"my-awesome-subscription"},"owner":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"ownerId":{"type":["string","null"],"description":"The unique identifier of the subscription owner","example":"LjRrbJ","writeOnly":true},"client":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscriberEmail":{"type":["string","null"],"description":"The subscription subscriber email address. Required for create unless the deprecated clientEmailAddress alias is provided.","example":"subscriber@example.com"},"clientEmailAddress":{"type":["string","null"],"deprecated":true,"description":"Deprecated alias for subscriberEmail.","example":"subscriber@example.com"},"organization":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"organizationId":{"type":["string","null"],"description":"The organization id (set to UNCLASSIFIED if null)","example":"6PV0xe","writeOnly":true},"account":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"accountId":{"type":["string","null"],"description":"The account id","example":"af75417c71d24e708f506596ce5ab675","writeOnly":true},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this subscription","example":"a91XJp","writeOnly":true},"product":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"productId":{"type":["string","null"],"description":"The product associated with the subscription","example":"af75417c71d24e708f506596ce5ab675","writeOnly":true},"credentials":{"type":["array","null"],"description":"The credentials associated with the product","items":{"$ref":"#/components/schemas/ResourceMetadata_Read"},"readOnly":true},"provisionedCredentialExternalId":{"type":["string","null"],"description":"The real externalId of the credential auto-provisioned by this create call (includeRelatedResources=true). Shown ONCE, in the create response only — credential read endpoints mask externalId, so this is the only place the generated value is obtainable. Use it as the `subscriberCredential` metering attribution handle.","readOnly":true},"credentialIds":{"type":["array","null"],"description":"The credential IDs associated with the product","example":["af75417c71d24e708f506596ce5ab675"],"items":{"type":"string"},"writeOnly":true},"expiration":{"type":["string","null"],"description":"The expiration of the subscription (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z"},"quotaNotificationThreshold":{"type":"number","format":"double","description":"The percentage of quota consumption to exceed before sending a notification","example":0.75},"notificationAddressesOnCreation":{"type":["array","null"],"description":"Additional email addresses for ProductKey creation notification","example":["admin@example.com"],"items":{"type":"string"}},"notificationAddressesOnQuotaThreshold":{"type":["array","null"],"description":"Additional email addresses for ProductKey quota notifications","example":["ops@example.com","billing@example.com"],"items":{"type":"string"}},"start":{"type":["string","null"],"description":"The subscription start date (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z"},"periodStart":{"type":["string","null"],"description":"Start date of current subscription period (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z"},"periodEnd":{"type":["string","null"],"description":"End date of current subscription period (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-30T23:59:59Z"},"trialEnd":{"type":["string","null"],"description":"End date of subscription trial period (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z"},"namedSubscribers":{"type":["array","null"],"description":"List of user email addresses who are allowed to access the subscription","example":["user1@example.com","user2@example.com"],"items":{"type":"string"}},"namedOrganizations":{"type":["array","null"],"description":"The named organizations associated with this subscription","items":{"$ref":"#/components/schemas/ResourceMetadata_Read"},"readOnly":true},"namedOrganizationIds":{"type":["array","null"],"description":"The named organization IDs associated with this subscription","example":["6PV0xe"],"items":{"type":"string"},"writeOnly":true},"sendToSubscriber":{"type":["boolean","null"],"description":"Whether to send notifications to the subscriber","example":true},"quotas":{"type":["array","null"],"description":"The quotas associated with the subscription","items":{"$ref":"#/components/schemas/RatingAggregationQuota_Read"},"readOnly":true},"identityProvider":{"type":["string","null"],"description":"The name of the identity provider","example":"Auth0"},"additionalInvoiceRecipients":{"type":["array","null"],"description":"Additional email addresses for invoice notifications","example":["finance@example.com","accounting@example.com"],"items":{"type":"string"}},"charge":{"type":["number","null"],"description":"The recurring charge associated with this subscription","example":99.99},"wentOverSubscriptionQuota":{"type":["boolean","null"],"description":"Went over subscription quota?","example":false},"tags":{"type":["array","null"],"description":"Tags associated with the subscription","example":["enterprise","annual"],"items":{"type":"string"}},"externalQuoteId":{"type":["string","null"],"description":"The quote the product key may be associated with in an external cpq / financial system","example":"quote-12345"},"allowImmediateCancellation":{"type":["boolean","null"],"description":"Allow immediate cancellation of the subscription","example":true},"tierQuotaNotificationThreshold":{"type":["number","null"],"format":"double","description":"The threshold Percentage for tier quota notifications","example":80},"subscriptionId":{"type":["string","null"],"description":"The subscription Id","example":"sub-abc123"},"periodCallCountConsumed":{"type":["number","null"],"format":"double","description":"The period call count consumed","readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["name","ownerId","productId","teamId"]},"SubscriptionPagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"subscriptionResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelSubscriptionResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"Embedded_Read":{"type":"object","properties":{"periodChargeResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelPeriodChargeResource_Read"}}}},"EntityModelPeriodChargeResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the period charge","example":"af75417c71d24e708f506596ce5ab675","readOnly":true},"resourceType":{"type":"string","description":"The resource type identifier for period charges","example":"period_charge","readOnly":true},"label":{"type":"string","description":"The display label for this period charge","example":"API Usage - September 2024","readOnly":true},"created":{"type":["string","null"],"description":"The timestamp when this period charge was created (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The timestamp when this period charge was last updated (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"transactionId":{"type":["string","null"],"description":"The unique transaction identifier for this period charge","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"product":{"$ref":"#/components/schemas/ResourceMetadata_Read","description":"Metadata of the product associated with this period charge","readOnly":true},"source":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscription":{"$ref":"#/components/schemas/ResourceMetadata_Read","description":"Metadata of the subscription associated with this period charge","readOnly":true},"invoice":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"credential":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"tier":{"oneOf":[{"$ref":"#/components/schemas/Tier_Read"},{"type":"null"}]},"planElement":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"setupFee":{"oneOf":[{"$ref":"#/components/schemas/SetupFee_Read"},{"type":"null"}]},"type":{"type":"string","description":"The transaction type category for this charge","enum":["TRANSACTIONAL","SUBSCRIPTION","ONETIME","SUBSCRIPTION_WITH_OVERAGE","NON_MONETIZED","INDIRECT","RESOURCE_USAGE"],"example":"TRANSACTIONAL","readOnly":true},"callCount":{"type":"integer","format":"int64","description":"The number of API calls or usage events aggregated into this period charge","example":100,"readOnly":true},"charge":{"type":"number","format":"double","description":"The monetary amount charged for this period in the specified currency","example":50,"readOnly":true},"currency":{"type":"string","description":"The currency code for this charge (ISO 4217 format)","enum":["USD","EUR","CAD","GBP","JPY","CNY","MXN","COP","ARS","ZMW","AUD","ZWG"],"example":"USD","readOnly":true},"settled":{"type":"boolean","description":"Indicates whether this period charge has been finalized and included on an invoice. Once settled, the charge cannot be modified","example":true,"readOnly":true},"settledAt":{"type":["string","null"],"description":"The timestamp when this period charge was settled and finalized (ISO 8601 extended date-time format)","example":"2024-09-02T00:00:00Z","readOnly":true},"expired":{"type":"boolean","description":"Indicates whether this period charge has expired and is no longer valid for billing","example":false,"readOnly":true},"remoteAddress":{"type":["string","null"],"description":"The IP address of the client that generated the API usage for this charge","example":"192.168.1.1","readOnly":true},"remoteUser":{"type":["string","null"],"description":"The identifier of the remote user or system that generated the API usage","example":"user@example.com","readOnly":true},"resource":{"type":["string","null"],"description":"The API resource path that was accessed during this period","example":"/api/v2/products","readOnly":true},"metadata":{"type":["string","null"],"description":"Additional metadata about this period charge as a JSON string. Contains custom fields and contextual information","example":{"region":"us-east-1","environment":"production"},"readOnly":true},"paymentProvider":{"type":["string","null"],"description":"The payment provider used for processing this charge","enum":["STRIPE"],"example":"STRIPE","readOnly":true},"unmodifiedCallCount":{"type":["integer","null"],"format":"int64","description":"The original call count before any adjustments or modifications were applied","example":100,"readOnly":true},"unmodifiedCharge":{"type":["number","null"],"format":"double","description":"The original charge amount before any adjustments, discounts, or modifications were applied","example":50,"readOnly":true},"trialInProgress":{"type":["boolean","null"],"description":"Indicates whether this charge occurred during an active trial period. Trial charges may be waived or handled differently","example":false,"readOnly":true},"chargeType":{"type":"string","description":"The specific type of charge classification","enum":["CHARGE_EXEMPT","SUBSCRIPTION_FLAT_RATE_CHARGE","SETUP_FEE_FLAT_RATE_CHARGE","ONETIME_FLAT_RATE_CHARGE","TIER_FLAT_RATE_CHARGE","ELEMENT_TRANSACTIONAL_CHARGE","TIER_CALL_COUNT_TRANSACTIONAL_CHARGE","CALL_COUNT_TRANSACTIONAL_CHARGE"],"example":"SUBSCRIPTION_FLAT_RATE_CHARGE","readOnly":true},"chargeDescription":{"type":["string","null"],"description":"A human-readable description of what this charge represents","example":"Monthly subscription fee","readOnly":true},"aggregatedElementValue":{"type":["number","null"],"format":"double","description":"The aggregated value of the metering element for this period. Represents the total measured usage","example":100,"readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["callCount","charge","chargeType","currency","expired","label","product","resourceType","settled","subscription","type"]},"PeriodChargeKeysetPage_Read":{"type":"object","properties":{"_embedded":{"$ref":"#/components/schemas/Embedded_Read","writeOnly":true},"embedded":{"$ref":"#/components/schemas/Embedded_Read"},"hasMore":{"type":"boolean"},"cursor":{"type":["string","null"]}}},"EntityModelInvoiceResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the invoice","example":"Rl31jE","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"invoice","readOnly":true},"label":{"type":"string","description":"The invoice's label (automatically set to the invoice number for display purposes)","example":"INV-2024-001","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp in ISO 8601 extended date-time format","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The last update timestamp in ISO 8601 extended date-time format","example":"2024-09-01T00:00:00Z","readOnly":true},"product":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscription":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"organization":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscriptionOwner":{"$ref":"#/components/schemas/ResourceMetadata_Read","description":"The user who owns the subscription associated with this invoice","readOnly":true},"team":{"$ref":"#/components/schemas/ResourceMetadata_Read","description":"The team that owns the product being billed","readOnly":true},"account":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"accountState":{"type":["string","null"],"description":"The current state of the billing account","enum":["CREATED","ACTIVATED","SUSPENDED","CLOSED"],"example":"ACTIVATED","readOnly":true},"state":{"type":["string","null"],"description":"The current state of the invoice in its lifecycle","enum":["DRAFT","FINALIZED","CLOSED","ISSUED","PAID","PARTIALLY_PAID"],"example":"ISSUED","readOnly":true},"accountNumber":{"type":["string","null"],"description":"The account number for the billing account","example":"ACC-12345","readOnly":true},"accountReliefState":{"type":["string","null"],"description":"The relief state of the billing account indicating if payment relief has been requested or granted","example":"REQUESTED","readOnly":true},"startDate":{"type":"string","description":"The start date of the billing period covered by this invoice in ISO 8601 extended date-time format","example":"2024-09-01T00:00:00Z","readOnly":true},"endDate":{"type":["string","null"],"description":"The end date of the billing period covered by this invoice in ISO 8601 extended date-time format","example":"2024-09-30T23:59:59Z","readOnly":true},"totalAmount":{"type":"number","description":"The total amount charged on this invoice before adjustments","example":1000,"readOnly":true},"totalAdjusted":{"type":"number","description":"The total amount after applying refunds and tax adjustments","example":950,"readOnly":true},"totalCallCount":{"type":"integer","format":"int64","description":"The total number of API calls included in this invoice","example":1000,"readOnly":true},"totalFreeCallCount":{"type":"integer","format":"int64","description":"The number of API calls that were included in the subscription quota and not charged","example":100,"readOnly":true},"totalRefund":{"type":"number","description":"The total amount refunded on this invoice","example":50,"readOnly":true},"invoiceJobId":{"type":["string","null"],"description":"The internal job identifier used to generate this invoice","example":"job-1234","readOnly":true},"paymentProvider":{"type":["string","null"],"description":"The payment provider used to process payment for this invoice","enum":["STRIPE"],"example":"STRIPE","readOnly":true},"invoiceNumber":{"type":["string","null"],"description":"The human-readable invoice number for customer reference","example":"INV-2024-001","readOnly":true},"currency":{"type":"string","description":"The currency code for all amounts on this invoice","enum":["USD","EUR","CAD","GBP","JPY","CNY","MXN","COP","ARS","ZMW","AUD","ZWG"],"example":"USD","readOnly":true},"invoicePayStatus":{"type":["string","null"],"description":"The payment status of the invoice indicating whether payment has been received","enum":["PAID","UNPAID","PARTIALLY_PAID","OVER_PAID","INVOICE_ONLY"],"example":"PAID","readOnly":true},"totalPaidAmount":{"type":["number","null"],"description":"The total amount that has been paid toward this invoice","example":950,"readOnly":true},"paymentSource":{"type":"string","description":"The source of payment for this invoice indicating how payment was processed","enum":["EXTERNAL_PAYMENT_NOTIFICATION","PAYMENT_VIA_PAYMENT_PROVIDER","INVOICE_ONLY_NO_PAYMENT"],"example":"PAYMENT_VIA_PAYMENT_PROVIDER","readOnly":true},"issued":{"type":["string","null"],"description":"The date when the invoice was issued to the customer in ISO 8601 extended date-time format","example":"2024-09-30T23:59:59Z","readOnly":true},"finalized":{"type":["string","null"],"description":"The date when the invoice was finalized and locked from further changes in ISO 8601 extended date-time format","example":"2024-09-30T23:59:59Z","readOnly":true},"isDemo":{"type":["boolean","null"],"description":"Indicates whether this is a demo invoice for trial or testing purposes","example":false,"readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["currency","label","paymentSource","resourceType","startDate","subscriptionOwner","team","totalAdjusted","totalAmount","totalCallCount","totalFreeCallCount","totalRefund"]},"InvoicePagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"invoiceResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelInvoiceResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"CredentialPagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"credentialResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelCredentialResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"EntityModelCredentialResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"credential","readOnly":true},"label":{"type":"string","description":"The credential's label (automatically set to the application name for display purposes)","example":"my-awesome-credential","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the credential","example":"Invoice API Credential (Staging)"},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this credential","example":"a91XJp","writeOnly":true},"organization":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"organizationId":{"type":["string","null"],"description":"The unique identifier of the organization that owns this credential","example":"6PV0xe","writeOnly":true},"subscriber":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscriberId":{"type":["string","null"],"description":"The unique identifier of the subscriber who owns this credential","example":"pEjxgX","writeOnly":true},"externalId":{"type":"string","description":"The external id of the credential","example":"d91450df5a74492cb5fa0ccadec26987"},"externalSecret":{"type":["string","null"],"description":"The external secret of the credential","example":"aklda93#Ax_As!@3414a"},"subscriptions":{"type":["array","null"],"description":"The subscriptions associated with this credential","items":{"$ref":"#/components/schemas/ResourceMetadata_Read"},"readOnly":true},"subscriptionIds":{"type":["array","null"],"description":"The subscription IDs associated with this credential","example":["sub-id-1","sub-id-2"],"items":{"type":"string"},"writeOnly":true},"tags":{"type":["array","null"],"description":"A list of tags associated with this credential. ","example":["tag1","tag2","tag3"],"items":{"type":"string"}},"identityProvider":{"type":["string","null"],"description":"The name of the identity provider","example":"Auth0"},"_links":{"$ref":"#/components/schemas/Links"}},"required":["externalId","name","organizationId","subscriberId","teamId"]},"PagedModelEntityModelToolResource_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"toolResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelToolResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"Pageable":{"type":"object","properties":{"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"sort":{"type":"array","items":{"type":"string"}}}},"BillingProfile":{"type":"object","description":"Billing profile configuration for a tenant account. Tracks the subscription plan tier, AI usage spending, revenue calculations, and quota status for both AI and product usage","properties":{"planType":{"type":["string","null"],"description":"The subscription plan tier for this tenant account. Determines feature access, usage quotas, and pricing","enum":["DEVELOPER","GROWTH","ENTERPRISE"],"example":"GROWTH"},"aiSpend":{"type":["number","null"],"description":"Total amount spent on AI usage (completions, embeddings, etc.) for the current billing period","example":247.83},"calculatedRevenue":{"type":["number","null"],"description":"Calculated revenue amount for this tenant based on their usage and pricing plan. Only populated when revenue calculation is enabled, products have been configured with usage-based pricing, and subscriptions have been created for those products.","example":1250},"overAIQuota":{"type":["boolean","null"],"description":"Indicates whether the tenant has exceeded their AI usage quota for the current billing period. When true, additional charges may apply or service may be restricted","example":false},"overProductQuota":{"type":["boolean","null"],"description":"Indicates whether the tenant has exceeded their product usage quota for the current billing period. When true, additional charges may apply or service may be restricted","example":false},"revenueCalculationEnabled":{"type":["boolean","null"],"description":"Indicates whether automatic revenue calculation is enabled for this tenant. When enabled, the system tracks and calculates revenue based on usage metrics","example":true},"subscriptionId":{"type":["string","null"],"description":"The unique identifier of the Revenium subscription associated with this billing profile. Links the tenant to their subscription record","example":"3By4RxL","readOnly":true},"periodStart":{"type":["string","null"],"description":"The timestamp when this billing period starts (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"periodEnd":{"type":["string","null"],"description":"The timestamp when this billing period ends (ISO 8601 extended date-time format)","example":"2024-10-01T00:00:00Z","readOnly":true}}},"TenantResource":{"type":"object","description":"tenant","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"tenant","readOnly":true},"label":{"type":"string","description":"The tenant's label (automatically set to the tenant name for display purposes)","example":"Weyland-Yutani Corporation","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the tenant","example":"Weyland-Yutani Corporation","readOnly":true},"description":{"type":"string","description":"The description of the tenant","example":"Global leader in AI-powered API management and usage-based billing","readOnly":true},"profileType":{"type":["string","null"],"description":"The profile type of the tenant set by Revenium","enum":["MONETIZATION","CHARGEBACK","AI"],"example":"AI"},"billingPlan":{"type":["string","null"],"description":"The billing plan tier for the tenant set by Revenium (determines pricing and quota limits)","enum":["DEVELOPER","GROWTH","ENTERPRISE"],"example":"DEVELOPER","readOnly":true},"aiDataIngested":{"type":["boolean","null"],"description":"Whether AI usage data has been ingested for this tenant","example":false,"readOnly":true},"billingProfile":{"oneOf":[{"$ref":"#/components/schemas/BillingProfile"},{"type":"null"}]},"strictIngestionMode":{"type":"boolean","description":"When true, AI ingestion rejects transactions that reference entities (Product, Subscriber, Credential, Consuming Organization) which do not already exist for this tenant, instead of auto-creating them. Defaults to false.","example":false,"readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["description","name"]},"IngestionFailureResource_Read":{"type":"object","description":"A strict-ingestion rejection: what was rejected, why, and the (redacted) payload","properties":{"failureTimestamp":{"type":"string","format":"date-time","description":"When the transaction was rejected","example":"2026-04-19T15:30:00Z"},"errors":{"type":"array","description":"Structured per-error details for the rejection (stable codes + remediation)","items":{"$ref":"#/components/schemas/StructuredError_Read"}},"originalPayload":{"$ref":"#/components/schemas/JsonNode_Read","description":"The rejected transaction payload, with prompt content redacted"}}},"JsonNode_Read":{"type":"object","properties":{"string":{"type":"boolean"},"array":{"type":"boolean"},"empty":{"type":"boolean"},"null":{"type":"boolean"},"float":{"type":"boolean"},"object":{"type":"boolean"},"number":{"type":"boolean"},"textual":{"type":"boolean","deprecated":true},"nodeType":{"type":"string","enum":["ARRAY","BINARY","BOOLEAN","MISSING","NULL","NUMBER","OBJECT","POJO","STRING"]},"missingNode":{"type":"boolean"},"valueNode":{"type":"boolean"},"pojo":{"type":"boolean"},"integralNumber":{"type":"boolean"},"floatingPointNumber":{"type":"boolean"},"short":{"type":"boolean"},"int":{"type":"boolean"},"long":{"type":"boolean"},"double":{"type":"boolean"},"bigDecimal":{"type":"boolean"},"bigInteger":{"type":"boolean"},"boolean":{"type":"boolean"},"binary":{"type":"boolean"},"container":{"type":"boolean"},"embeddedValue":{"type":"boolean"}}},"EntityModelOrganizationResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"organization","readOnly":true},"label":{"type":"string","description":"The object's label","example":"Weyland-Yutani Corporation","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the organization","example":"Weyland-Yutani Corporation"},"externalId":{"type":["string","null"],"description":"The organization's external id","example":"WY-1234"},"logo":{"type":["string","null"],"description":"The organization's logo","example":"https://www.example.com/logo.png"},"address1":{"type":["string","null"],"description":"The organization's address 1","example":"Main St."},"address2":{"type":["string","null"],"description":"The organization's address 2","example":"Suite 100"},"city":{"type":["string","null"],"description":"The organization's city address","example":"Brooklyn"},"state":{"type":["string","null"],"description":"The organization's state address","example":"NY"},"country":{"type":["string","null"],"description":"The organization's country","example":"USA"},"postalCode":{"type":["string","null"],"description":"The organization's postal code","example":"11201"},"billingPhoneNumber":{"type":["string","null"],"description":"The organization's billing phone number","example":"555-555-5555"},"phoneNumber":{"type":["string","null"],"description":"The organization's phone number","example":"555-555-5555"},"emailAddress":{"type":["string","null"],"description":"The organization's contact email address","example":"contact@weyland-yutani.com"},"remittanceInstructions":{"type":["string","null"],"description":"The organization's remittance instructions","example":"Please remit payment to the address above"},"url":{"type":["string","null"],"description":"The organization's website URL","example":"https://www.weyland-yutani.com"},"currency":{"type":["string","null"],"description":"The organization's currency","enum":["USD","EUR","CAD","GBP","JPY","CNY","MXN","COP","ARS","ZMW","AUD","ZWG"],"example":"USD"},"metadata":{"type":["string","null"],"description":"The organization's metadata (in key / value pairs)","example":"{'key1': 'value1', 'key2': 'value2'}"},"domainAliases":{"type":["array","null"],"description":"The organization's domain aliases","example":["weyland-yutani.com","wy-corp.com"],"items":{"type":"string"}},"types":{"type":["array","null"],"description":"The organization type (array with single value). Use CONSUMER for organizations (end customers who consume APIs and accumulate usage costs). Note: MANAGING is used by team endpoints (see /v2/api/teams) and should not be used when creating organizations.","example":["CONSUMER"],"items":{"type":"string","enum":["CONSUMER"]}},"tenant":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"tenantId":{"type":["string","null"],"description":"The unique identifier of the tenant that owns this organization. Required to associate the organization with a tenant. Format: Revenium hashid (URL-safe encoded string).","example":"6PV0xe","writeOnly":true},"parent":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"parentId":{"type":["string","null"],"description":"Optional. Omit this field when creating a top-level organization. To create a nested organization, set parentId to an existing organization ID (retrieve IDs using GET /v2/api/organizations?tenantId={tenantId}). Format: Revenium hashid (URL-safe encoded string).","example":"6PV0xe","writeOnly":true},"sourceAutoDiscoveryEnabled":{"type":["boolean","null"],"description":"Whether automatic discovery of API sources is enabled for this organization","example":true},"elementDefinitionAutoDiscoveryEnabled":{"type":["boolean","null"],"description":"Whether automatic discovery of metering element definitions is enabled for this organization","example":true},"billingEmail":{"type":["string","null"],"description":"The email address for billing-related communications","example":"billing@weyland-yutani.com"},"callCountElementDefinition":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"_links":{"$ref":"#/components/schemas/Links"}},"required":["name","tenant","tenantId"]},"OrganizationPagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"organizationResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelOrganizationResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"EntityModelOrganizationResource":{"type":"object","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"organization","readOnly":true},"label":{"type":"string","description":"The object's label","example":"Weyland-Yutani Corporation","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the organization","example":"Weyland-Yutani Corporation"},"externalId":{"type":["string","null"],"description":"The organization's external id","example":"WY-1234"},"logo":{"type":["string","null"],"description":"The organization's logo","example":"https://www.example.com/logo.png"},"address1":{"type":["string","null"],"description":"The organization's address 1","example":"Main St."},"address2":{"type":["string","null"],"description":"The organization's address 2","example":"Suite 100"},"city":{"type":["string","null"],"description":"The organization's city address","example":"Brooklyn"},"state":{"type":["string","null"],"description":"The organization's state address","example":"NY"},"country":{"type":["string","null"],"description":"The organization's country","example":"USA"},"postalCode":{"type":["string","null"],"description":"The organization's postal code","example":"11201"},"billingPhoneNumber":{"type":["string","null"],"description":"The organization's billing phone number","example":"555-555-5555"},"phoneNumber":{"type":["string","null"],"description":"The organization's phone number","example":"555-555-5555"},"emailAddress":{"type":["string","null"],"description":"The organization's contact email address","example":"contact@weyland-yutani.com"},"remittanceInstructions":{"type":["string","null"],"description":"The organization's remittance instructions","example":"Please remit payment to the address above"},"url":{"type":["string","null"],"description":"The organization's website URL","example":"https://www.weyland-yutani.com"},"currency":{"type":["string","null"],"description":"The organization's currency","enum":["USD","EUR","CAD","GBP","JPY","CNY","MXN","COP","ARS","ZMW","AUD","ZWG"],"example":"USD"},"metadata":{"type":["string","null"],"description":"The organization's metadata (in key / value pairs)","example":"{'key1': 'value1', 'key2': 'value2'}"},"domainAliases":{"type":["array","null"],"description":"The organization's domain aliases","example":["weyland-yutani.com","wy-corp.com"],"items":{"type":"string"}},"types":{"type":["array","null"],"description":"The organization type (array with single value). Use CONSUMER for organizations (end customers who consume APIs and accumulate usage costs). Note: MANAGING is used by team endpoints (see /v2/api/teams) and should not be used when creating organizations.","example":["CONSUMER"],"items":{"type":"string","enum":["CONSUMER"]}},"tenant":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"tenantId":{"type":["string","null"],"description":"The unique identifier of the tenant that owns this organization. Required to associate the organization with a tenant. Format: Revenium hashid (URL-safe encoded string).","example":"6PV0xe","writeOnly":true},"parent":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"parentId":{"type":["string","null"],"description":"Optional. Omit this field when creating a top-level organization. To create a nested organization, set parentId to an existing organization ID (retrieve IDs using GET /v2/api/organizations?tenantId={tenantId}). Format: Revenium hashid (URL-safe encoded string).","example":"6PV0xe","writeOnly":true},"sourceAutoDiscoveryEnabled":{"type":["boolean","null"],"description":"Whether automatic discovery of API sources is enabled for this organization","example":true},"elementDefinitionAutoDiscoveryEnabled":{"type":["boolean","null"],"description":"Whether automatic discovery of metering element definitions is enabled for this organization","example":true},"billingEmail":{"type":["string","null"],"description":"The email address for billing-related communications","example":"billing@weyland-yutani.com"},"callCountElementDefinition":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"_links":{"$ref":"#/components/schemas/Links"}},"required":["name","tenant","tenantId"]},"OrganizationPagedModel":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"organizationResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelOrganizationResource"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata"}}},"PageMetadata":{"type":"object","properties":{"size":{"type":"integer","format":"int64"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int64"},"number":{"type":"integer","format":"int64"}}},"EntityModelSubscriptionResource":{"type":"object","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"subscription","readOnly":true},"label":{"type":"string","description":"The subscription's label (automatically set to the client's email address for display purposes)","example":"client@example.com","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the subscription","example":"my-awesome-subscription"},"owner":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"ownerId":{"type":["string","null"],"description":"The unique identifier of the subscription owner","example":"LjRrbJ","writeOnly":true},"client":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"subscriberEmail":{"type":["string","null"],"description":"The subscription subscriber email address. Required for create unless the deprecated clientEmailAddress alias is provided.","example":"subscriber@example.com"},"clientEmailAddress":{"type":["string","null"],"deprecated":true,"description":"Deprecated alias for subscriberEmail.","example":"subscriber@example.com"},"organization":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"organizationId":{"type":["string","null"],"description":"The organization id (set to UNCLASSIFIED if null)","example":"6PV0xe","writeOnly":true},"account":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"accountId":{"type":["string","null"],"description":"The account id","example":"af75417c71d24e708f506596ce5ab675","writeOnly":true},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this subscription","example":"a91XJp","writeOnly":true},"product":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"productId":{"type":["string","null"],"description":"The product associated with the subscription","example":"af75417c71d24e708f506596ce5ab675","writeOnly":true},"credentials":{"type":["array","null"],"description":"The credentials associated with the product","items":{"$ref":"#/components/schemas/ResourceMetadata"},"readOnly":true},"provisionedCredentialExternalId":{"type":["string","null"],"description":"The real externalId of the credential auto-provisioned by this create call (includeRelatedResources=true). Shown ONCE, in the create response only — credential read endpoints mask externalId, so this is the only place the generated value is obtainable. Use it as the `subscriberCredential` metering attribution handle.","readOnly":true},"credentialIds":{"type":["array","null"],"description":"The credential IDs associated with the product","example":["af75417c71d24e708f506596ce5ab675"],"items":{"type":"string"},"writeOnly":true},"expiration":{"type":["string","null"],"description":"The expiration of the subscription (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z"},"quotaNotificationThreshold":{"type":"number","format":"double","description":"The percentage of quota consumption to exceed before sending a notification","example":0.75},"notificationAddressesOnCreation":{"type":["array","null"],"description":"Additional email addresses for ProductKey creation notification","example":["admin@example.com"],"items":{"type":"string"}},"notificationAddressesOnQuotaThreshold":{"type":["array","null"],"description":"Additional email addresses for ProductKey quota notifications","example":["ops@example.com","billing@example.com"],"items":{"type":"string"}},"start":{"type":["string","null"],"description":"The subscription start date (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z"},"periodStart":{"type":["string","null"],"description":"Start date of current subscription period (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z"},"periodEnd":{"type":["string","null"],"description":"End date of current subscription period (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-30T23:59:59Z"},"trialEnd":{"type":["string","null"],"description":"End date of subscription trial period (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z"},"namedSubscribers":{"type":["array","null"],"description":"List of user email addresses who are allowed to access the subscription","example":["user1@example.com","user2@example.com"],"items":{"type":"string"}},"namedOrganizations":{"type":["array","null"],"description":"The named organizations associated with this subscription","items":{"$ref":"#/components/schemas/ResourceMetadata"},"readOnly":true},"namedOrganizationIds":{"type":["array","null"],"description":"The named organization IDs associated with this subscription","example":["6PV0xe"],"items":{"type":"string"},"writeOnly":true},"sendToSubscriber":{"type":["boolean","null"],"description":"Whether to send notifications to the subscriber","example":true},"quotas":{"type":["array","null"],"description":"The quotas associated with the subscription","items":{"$ref":"#/components/schemas/RatingAggregationQuota"},"readOnly":true},"identityProvider":{"type":["string","null"],"description":"The name of the identity provider","example":"Auth0"},"additionalInvoiceRecipients":{"type":["array","null"],"description":"Additional email addresses for invoice notifications","example":["finance@example.com","accounting@example.com"],"items":{"type":"string"}},"charge":{"type":["number","null"],"description":"The recurring charge associated with this subscription","example":99.99},"wentOverSubscriptionQuota":{"type":["boolean","null"],"description":"Went over subscription quota?","example":false},"tags":{"type":["array","null"],"description":"Tags associated with the subscription","example":["enterprise","annual"],"items":{"type":"string"}},"externalQuoteId":{"type":["string","null"],"description":"The quote the product key may be associated with in an external cpq / financial system","example":"quote-12345"},"allowImmediateCancellation":{"type":["boolean","null"],"description":"Allow immediate cancellation of the subscription","example":true},"tierQuotaNotificationThreshold":{"type":["number","null"],"format":"double","description":"The threshold Percentage for tier quota notifications","example":80},"subscriptionId":{"type":["string","null"],"description":"The subscription Id","example":"sub-abc123"},"periodCallCountConsumed":{"type":["number","null"],"format":"double","description":"The period call count consumed","readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["name","ownerId","productId","teamId"]},"SubscriptionPagedModel":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"subscriptionResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelSubscriptionResource"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata"}}},"QuotaConsumed":{"type":"object","description":"Quota consumed","properties":{"limit":{"type":"integer","format":"int64","description":"Quota"},"consumed":{"type":"integer","format":"int64","description":"Quota consumed"}}},"AmountBilled":{"type":"object","description":"The total amount billed for a subscription","properties":{"amountBilled":{"type":"number","format":"double","description":"The total amount billed for the subscription"}}},"EntityModelSubscriberResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"user","readOnly":true},"label":{"type":"string","description":"The subscriber's label (automatically set to the email address for display purposes)","example":"user@example.com","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"email":{"type":"string","description":"The email address of the user","example":"ash@weyland-yutani.io"},"firstName":{"type":["string","null"],"description":"The first name of the user","example":"Ash"},"lastName":{"type":["string","null"],"description":"The last name of the user","example":"Williams"},"phoneNumber":{"type":["string","null"],"description":"The phone number associated with the user","example":"001-718-555-5555"},"tenant":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"organizations":{"type":["array","null"],"description":"The organizations the user belongs to","items":{"$ref":"#/components/schemas/ResourceMetadata_Read"},"readOnly":true},"organizationIds":{"type":"array","description":"The organization IDs the user belongs to","example":["6PV0xe"],"items":{"type":"string"},"writeOnly":true},"subscriberId":{"type":["string","null"],"description":"The ID of the subscriber","example":"pEjxgX"},"_links":{"$ref":"#/components/schemas/Links"}},"required":["email"]},"SubscriberPagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"subscriberResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelSubscriberResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"EntityModelSquadExecutionResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the squad execution (squadId from telemetry)","example":"squad-loan-proc-12345","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"squadExecution","readOnly":true},"label":{"type":"string","description":"The squad execution's label (squadName or squadId for display purposes)","example":"Loan Processing","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (not applicable for squad executions)","example":"2025-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (not applicable for squad executions)","example":"2025-09-01T00:01:30Z","readOnly":true},"squadName":{"type":["string","null"],"description":"Human-readable name for the squad (e.g., 'Loan Processing', 'Document Analysis')","example":"Loan Processing","readOnly":true},"startTime":{"type":"string","description":"The start time of the squad execution (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:00Z","readOnly":true},"endTime":{"type":"string","description":"The end time of the squad execution (ISO 8601 extended date-time format)","example":"2025-09-01T00:01:30Z","readOnly":true},"duration":{"type":"integer","format":"int64","description":"The total duration of the squad execution in milliseconds","example":90000,"readOnly":true},"agentCount":{"type":"integer","format":"int64","description":"The number of distinct agents that participated in this squad execution","example":5,"readOnly":true},"traceCount":{"type":"integer","format":"int64","description":"The number of distinct traces in this squad execution","example":3,"readOnly":true},"totalCost":{"type":["number","null"],"description":"The total cost across all transactions in this squad execution","example":0.0524,"readOnly":true},"status":{"type":"string","description":"Overall status of the squad execution: SUCCESS (all agents succeeded), PARTIAL (some agents failed), or FAILED (all agents failed)","example":"SUCCESS","readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["agentCount","duration","endTime","id","label","resourceType","startTime","status","traceCount"]},"SquadExecutionListPagedModel_Read":{"type":"object","description":"Paginated list of squad execution resources with HATEOAS pagination metadata","properties":{"_embedded":{"type":"object","properties":{"squadExecutionResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelSquadExecutionResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"SquadAgentResource_Read":{"type":"object","description":"Agent breakdown showing each agent's contribution to the squad","properties":{"agent":{"type":"string","description":"The agent name","example":"DocExtractor","readOnly":true},"role":{"type":["string","null"],"description":"The agent's role within the squad","example":"Document Extraction","readOnly":true},"startTime":{"type":"string","description":"When this agent started (ISO 8601)","example":"2025-09-01T00:00:00Z","readOnly":true},"endTime":{"type":"string","description":"When this agent finished (ISO 8601)","example":"2025-09-01T00:00:30Z","readOnly":true},"duration":{"type":"integer","format":"int64","description":"Total duration of this agent's activities in milliseconds","example":30000,"readOnly":true},"transactionCount":{"type":"integer","format":"int32","description":"Number of transactions by this agent","example":5,"readOnly":true},"inputTokens":{"type":"integer","format":"int64","description":"Total input tokens used by this agent","example":1500,"readOnly":true},"outputTokens":{"type":"integer","format":"int64","description":"Total output tokens used by this agent","example":800,"readOnly":true},"totalTokens":{"type":"integer","format":"int64","description":"Total tokens used by this agent","example":2300,"readOnly":true},"cost":{"type":["number","null"],"description":"Cost contribution from this agent","example":0.0125,"readOnly":true},"model":{"type":["string","null"],"description":"Primary model used by this agent","example":"gpt-4","readOnly":true},"provider":{"type":["string","null"],"description":"Primary provider used by this agent","example":"OpenAI","readOnly":true},"errorCount":{"type":"integer","format":"int32","description":"Number of failed transactions by this agent","example":0,"readOnly":true}},"required":["agent","duration","endTime","errorCount","inputTokens","outputTokens","startTime","totalTokens","transactionCount"]},"SquadDetailResource_Read":{"type":"object","description":"Detailed squad execution with full metrics, agent breakdown, and trace references","properties":{"id":{"type":"string","description":"The unique identifier of the squad (squadId)","example":"squad-loan-proc-12345","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"squad.detail","readOnly":true},"label":{"type":"string","description":"The squad's label (squadName or squadId for display purposes)","example":"Loan Processing","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (not applicable for aggregated squads)","example":"2025-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (not applicable for aggregated squads)","example":"2025-09-01T00:01:30Z","readOnly":true},"squadName":{"type":["string","null"],"description":"Human-readable name for the squad type","example":"Loan Processing","readOnly":true},"startTime":{"type":"string","description":"The start time of the squad execution (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:00Z","readOnly":true},"endTime":{"type":"string","description":"The end time of the squad execution (ISO 8601 extended date-time format)","example":"2025-09-01T00:01:30Z","readOnly":true},"duration":{"type":"integer","format":"int64","description":"The total duration of the squad execution in milliseconds","example":90000,"readOnly":true},"agentCount":{"type":"integer","format":"int64","description":"The number of distinct agents that participated in this squad","example":5,"readOnly":true},"traceCount":{"type":"integer","format":"int64","description":"The number of distinct traces in this squad","example":3,"readOnly":true},"transactionCount":{"type":"integer","format":"int32","description":"The total number of transactions (AI completions) in this squad","example":15,"readOnly":true},"errorCount":{"type":"integer","format":"int32","description":"The number of failed transactions in this squad","example":2,"readOnly":true},"totalCost":{"type":["number","null"],"description":"The total cost across all transactions in this squad","example":0.0524,"readOnly":true},"inputTokens":{"type":"integer","format":"int64","description":"Total number of input tokens across all transactions","example":5000,"readOnly":true},"outputTokens":{"type":"integer","format":"int64","description":"Total number of output tokens across all transactions","example":3000,"readOnly":true},"totalTokens":{"type":"integer","format":"int64","description":"Total number of tokens across all transactions","example":8000,"readOnly":true},"status":{"type":"string","description":"Overall status of the squad (SUCCESS, PARTIAL, FAILED)","example":"SUCCESS","readOnly":true},"agents":{"type":"array","description":"Breakdown of each agent's contribution to the squad","items":{"$ref":"#/components/schemas/SquadAgentResource_Read"},"readOnly":true},"traceIds":{"type":"array","description":"List of trace IDs associated with this squad for drill-down","example":["trace-abc-123","trace-def-456"],"items":{"type":"string"},"readOnly":true},"models":{"type":"array","description":"List of distinct AI models used in this squad","example":["gpt-4","claude-3"],"items":{"type":"string"},"readOnly":true},"providers":{"type":"array","description":"List of distinct AI providers used in this squad","example":["OpenAI","Anthropic"],"items":{"type":"string"},"readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["agentCount","agents","duration","endTime","errorCount","id","inputTokens","label","models","outputTokens","providers","resourceType","startTime","status","totalTokens","traceCount","traceIds","transactionCount"]},"SquadTimelineEvent_Read":{"type":"object","description":"Individual timeline event for waterfall visualization","properties":{"id":{"type":"string","description":"Unique identifier for this event (transactionId/spanId)","readOnly":true},"traceId":{"type":["string","null"],"description":"The trace ID this event belongs to","readOnly":true},"agent":{"type":["string","null"],"description":"The agent that executed this event","example":"DocExtractor","readOnly":true},"role":{"type":["string","null"],"description":"The agent's role within the squad","example":"Document Extraction","readOnly":true},"timestamp":{"type":"integer","format":"int64","description":"Start time of this event as epoch milliseconds (for timeline positioning)","example":1693526400000,"readOnly":true},"startTime":{"type":"string","description":"Start time of this event (ISO 8601)","example":"2025-09-01T00:00:00Z","readOnly":true},"endTime":{"type":"string","description":"End time of this event (ISO 8601)","example":"2025-09-01T00:00:05Z","readOnly":true},"duration":{"type":"integer","format":"int64","description":"Duration of this event in milliseconds","example":5000,"readOnly":true},"requestDuration":{"type":"integer","format":"int64","description":"Request duration in milliseconds (alias for duration, for WaterfallTimeline compatibility)","example":5000,"readOnly":true},"model":{"type":"string","description":"The AI model used","example":"gpt-4","readOnly":true},"provider":{"type":"string","description":"The AI provider","example":"OpenAI","readOnly":true},"operationType":{"type":["string","null"],"description":"The operation type (CHAT, IMAGE, AUDIO, VIDEO, etc.)","enum":["CHAT","GENERATE","EMBED","CLASSIFY","SUMMARIZE","TRANSLATE","OTHER","TOOL_CALL","RERANK","SEARCH","MODERATION","VISION","TRANSFORM","GUARDRAIL","AUDIO","VIDEO","IMAGE"],"example":"CHAT","readOnly":true},"inputTokens":{"type":["integer","null"],"format":"int64","description":"Number of input tokens (null for non-completion metrics)","example":500,"readOnly":true},"outputTokens":{"type":["integer","null"],"format":"int64","description":"Number of output tokens (null for non-completion metrics)","example":200,"readOnly":true},"totalTokens":{"type":["integer","null"],"format":"int64","description":"Total number of tokens (null for non-completion metrics)","example":700,"readOnly":true},"cost":{"type":["number","null"],"description":"Cost of this event in USD","example":0.0024,"readOnly":true},"totalCost":{"type":["number","null"],"description":"Total cost (alias for cost, for compatibility)","example":0.0024,"readOnly":true},"errorReason":{"type":["string","null"],"description":"Error message if this event failed","readOnly":true},"transactionName":{"type":["string","null"],"description":"Human-readable name for this transaction","example":"Extract Document Fields","readOnly":true},"taskType":{"type":["string","null"],"description":"The type of task performed","example":"chat","readOnly":true},"timeToFirstToken":{"type":["integer","null"],"format":"int64","description":"Time to first token in milliseconds","example":250,"readOnly":true}},"required":["duration","endTime","id","model","provider","requestDuration","startTime","timestamp"]},"SquadTimelineResource_Read":{"type":"object","description":"Squad timeline containing ordered events for waterfall visualization","properties":{"squadId":{"type":"string","description":"The unique identifier of the squad","readOnly":true},"squadName":{"type":["string","null"],"description":"Human-readable name for the squad type","example":"Loan Processing","readOnly":true},"startTime":{"type":"string","description":"The earliest start time across all events (ISO 8601)","example":"2025-09-01T00:00:00Z","readOnly":true},"endTime":{"type":"string","description":"The latest end time across all events (ISO 8601)","example":"2025-09-01T00:01:30Z","readOnly":true},"totalDuration":{"type":"integer","format":"int64","description":"Total duration of the squad in milliseconds","example":90000,"readOnly":true},"events":{"type":"array","description":"Ordered sequence of timeline events","items":{"$ref":"#/components/schemas/SquadTimelineEvent_Read"},"readOnly":true}},"required":["endTime","events","squadId","startTime","totalDuration"]},"EntityModelSquadResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the squad (hash-encoded database ID)","example":"JMwX9g4","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"squad","readOnly":true},"label":{"type":"string","description":"The squad's display name","example":"Loan Processing","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp of the squad (ISO 8601)","example":"2025-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The last updated timestamp of the squad (ISO 8601)","example":"2025-09-01T00:01:30Z","readOnly":true},"description":{"type":["string","null"],"description":"Optional description of the squad's purpose","example":"Handles end-to-end loan application processing","readOnly":true},"source":{"type":["string","null"],"description":"How the squad was created (TELEMETRY, UI, or API)","enum":["TELEMETRY","UI","API"],"example":"TELEMETRY","readOnly":true},"executionCount":{"type":"integer","format":"int64","description":"The number of distinct executions (squadIds) for this squad","example":42,"readOnly":true},"totalCost":{"type":["number","null"],"description":"The total cost across all executions for this squad","example":125.5,"readOnly":true},"agentCount":{"type":"integer","format":"int64","description":"Total agent count across all executions","example":8,"readOnly":true},"traceCount":{"type":"integer","format":"int64","description":"Total trace count across all executions","example":156,"readOnly":true},"firstExecutionTime":{"type":["string","null"],"description":"Timestamp of the first execution (ISO 8601)","example":"2025-09-01T00:00:00Z","readOnly":true},"lastExecutionTime":{"type":["string","null"],"description":"Timestamp of the most recent execution (ISO 8601)","example":"2025-09-15T14:30:00Z","readOnly":true},"successCount":{"type":"integer","format":"int64","description":"The number of executions with SUCCESS status","example":38,"readOnly":true},"partialCount":{"type":"integer","format":"int64","description":"The number of executions with PARTIAL status","example":3,"readOnly":true},"failedCount":{"type":"integer","format":"int64","description":"The number of executions with FAILED status","example":1,"readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["agentCount","executionCount","failedCount","id","label","partialCount","resourceType","successCount","traceCount"]},"SquadPagedModel_Read":{"type":"object","description":"Paginated list of squad resources","properties":{"_embedded":{"type":"object","properties":{"squadResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelSquadResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"EntityModelSourceResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"source","readOnly":true},"label":{"type":"string","description":"The source's label (automatically set to the source name for display purposes)","example":"my-awesome-source","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the source","example":"my-awesome-source"},"description":{"type":["string","null"],"description":"The description of the source","example":"Truly an awesome data source"},"version":{"type":"string","description":"The source's version","example":"1.0.0"},"descriptionAsHTML":{"type":["string","null"],"description":"The description of the source (HTML formatted)","example":"<b>Truly an awesome data source</b>"},"type":{"type":"string","description":"The type of the source","enum":["API","AI","UNCLASSIFIED","RESOURCE","CONNECTOR","TEMPLATE","POLICY","STREAM","CONSUMER_DATA","CUSTOM","APP","ROUTE"],"example":"API"},"autoDiscoveryEnabled":{"type":["boolean","null"],"description":"Whether or not the source is auto-discovered","example":false},"resource":{"type":["string","null"],"description":"The source's unique resource / URI","example":"/api/products"},"method":{"type":["string","null"],"description":"The source's method","example":"GET"},"logoURL":{"type":["string","null"],"description":"Path for the Assets' logo","example":"https://example.com/logo.png","readOnly":true},"devPortalLink":{"type":["string","null"],"description":"The devPortalLink of the asset","example":"https://devportal.example.com/my-awesome-source"},"sourceType":{"type":["string","null"],"description":"The source type of the asset (ie, MULESOFT, etc)","enum":["UNKNOWN","AI","SDK_PYTHON","SDK_JS","SDK_JVM","SDK_SPRING","SDK_DOTNET","SDK_GOLANG","SDK_RUST","EBPF","AWS","AZURE","SNOWFLAKE","GRAVITEE","MULESOFT","BOOMI","REVENIUM","INTERNAL"],"example":"MULESOFT"},"externalId":{"type":["string","null"],"description":"The external id associated with the source (generally an ID in an APIM platform)","example":"ext-source-001"},"externalUsagePlanId":{"type":["string","null"],"description":"The external plan id associated with the source (generally a usage plan in an APIM platform)","example":"usage-plan-abc123"},"tags":{"type":["array","null"],"description":"Tags associated with the source","example":["production","api","v1"],"items":{"type":"string"}},"sourceClassifications":{"type":["array","null"],"description":"The source classifications","example":[],"items":{"$ref":"#/components/schemas/SourceClassification_Read"}},"owner":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"ownerId":{"type":["string","null"],"description":"The unique identifier of the source owner","example":"LjRrbJ","writeOnly":true},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this source","example":"a91XJp","writeOnly":true},"environment":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"meteringElementDefinitions":{"type":["array","null"],"description":"The metering element definitions associated with the source","items":{"$ref":"#/components/schemas/ResourceMetadata_Read"},"readOnly":true},"products":{"type":["array","null"],"description":"The products associated with the source","items":{"$ref":"#/components/schemas/ResourceMetadata_Read"},"readOnly":true},"meteringElementDefinitionIds":{"type":["array","null"],"description":"The metering element definition IDs associated with the source","example":["af75417c71d24e708f506596ce5ab675","bf86528d82e54f1a7df96ca7de747786"],"items":{"type":"string"},"writeOnly":true},"contracts":{"type":["array","null"],"description":"The API contract/specifications associated with the source","items":{"$ref":"#/components/schemas/ResourceMetadata_Read"},"readOnly":true},"contractIds":{"type":["array","null"],"description":"The API contract/specifications IDs associated with the source","example":["af75417c71d24e708f506596ce5ab675"],"items":{"type":"string"},"writeOnly":true},"meteringId":{"type":["string","null"],"description":"The metering id associated with the source","readOnly":true},"metadata":{"type":["string","null"],"description":"Metadata","example":"language=En,test=test"},"assetUsageIdentifier":{"type":["string","null"],"description":"Type of metering identification for source","enum":["CUSTOM_ID","API_ENDPOINT","REVENIUM_ID"],"example":"REVENIUM_ID"},"_links":{"$ref":"#/components/schemas/Links"}},"required":["name","ownerId","teamId","type","version"]},"SourcePagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"sourceResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelSourceResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"RevisionDataPagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"revisionDataResourceList":{"type":"array","items":{"$ref":"#/components/schemas/RevisionDataResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"RevisionDataResource_Read":{"type":"object","description":"A product or asset revision/audit record","properties":{"changeDate":{"type":"string","description":"The timestamp when the change occurred (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"user":{"type":["string","null"],"description":"The username of the user who made the change","example":"admin@revenium.io","readOnly":true},"field":{"type":["string","null"],"description":"The field/property that was changed","example":"name","readOnly":true},"previousValue":{"type":["string","null"],"description":"The previous value before the change","example":"Old Product Name","readOnly":true},"currentValue":{"type":["string","null"],"description":"The new value after the change","example":"New Product Name","readOnly":true},"changeType":{"type":["string","null"],"description":"The type of change operation","enum":["UNKNOWN","INSERT","UPDATE","DELETE"],"example":"UPDATE","readOnly":true},"attribute":{"type":["string","null"],"description":"The attribute affected by the revision","example":"name","readOnly":true}},"required":["changeDate"]},"EntityModelToolEventResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the line item","example":"jR2kmLs","readOnly":true},"resourceType":{"type":"string","description":"The type of resource","example":"tool_event","readOnly":true},"label":{"type":"string","description":"The display label for this tool event (tool name, tool ID, or record ID)","example":"Web Search Tool","readOnly":true},"transactionId":{"type":["string","null"],"description":"The transaction ID for this tool event","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"toolId":{"type":["string","null"],"description":"The tool's external identifier","example":"search_web","readOnly":true},"toolName":{"type":["string","null"],"description":"The tool name","example":"Web Search Tool","readOnly":true},"toolType":{"type":["string","null"],"description":"The tool type","enum":["SDK","MCP_SERVER","AI_SERVICE","REST_API","LOCAL_FUNCTION","CUSTOM"],"example":"MCP_SERVER","readOnly":true},"toolProvider":{"type":["string","null"],"description":"The tool provider","example":"anthropic","readOnly":true},"operation":{"type":["string","null"],"description":"The operation performed (parsed from the resource field)","example":"execute","readOnly":true},"charge":{"type":["number","null"],"description":"The charge amount for this tool event","example":0.05,"readOnly":true},"currency":{"type":["string","null"],"description":"The currency of the charge","example":"USD","readOnly":true},"costUsd":{"type":["number","null"],"description":"The cost in USD (from metadata, if available)","example":0.05,"readOnly":true},"callCount":{"type":["integer","null"],"format":"int64","description":"Number of calls rolled into this line item","example":1,"readOnly":true},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"product":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"tool":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"resource":{"type":["string","null"],"description":"The raw resource identifier","example":"tool:search_web:execute","readOnly":true},"timestamp":{"type":["string","null"],"description":"Event timestamp in ISO 8601 format","example":"2025-10-17T17:35:00Z","readOnly":true},"created":{"type":["string","null"],"description":"Record creation timestamp in ISO 8601 format","example":"2025-10-17T17:35:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"Record last updated timestamp in ISO 8601 format","example":"2025-10-17T17:35:03Z","readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}}},"ToolEventPagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"toolEventResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelToolEventResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"AIMetricPagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"aIMetricResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelAIMetricResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"AIMetricResource_Read":{"type":"object","description":"AI metric record with common fields across all modalities","properties":{"id":{"type":"string","description":"The unique identifier of the AI metric","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"ai_metric","readOnly":true},"label":{"type":"string","description":"The AI metric's label (automatically set to the transaction ID for display purposes)","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"metricType":{"type":"string","description":"The type of AI metric (modality)","enum":["COMPLETION","AUDIO","VIDEO","IMAGE"],"example":"COMPLETION","readOnly":true},"transactionId":{"type":"string","description":"Alias for spanId. Both fields contain the same value.","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"spanId":{"type":"string","description":"Unique identifier for this transaction.","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"traceId":{"type":["string","null"],"description":"Trace multiple AI operations belonging to same overall request","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"source":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"team":{"$ref":"#/components/schemas/ResourceMetadata_Read","description":"The team (organization)","readOnly":true},"organization":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscriberCredential":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"product":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscriptionId":{"type":["string","null"],"description":"The subscription ID","readOnly":true},"subscriberEmail":{"type":["string","null"],"description":"The subscriber email","readOnly":true},"subscriberId":{"type":["string","null"],"description":"The ID of the subscriber from your system","example":"user-123","readOnly":true},"model":{"type":"string","description":"The AI model used","example":"gpt-4o","readOnly":true},"modelSource":{"type":["string","null"],"description":"The source of the AI model","example":"OPENAI","readOnly":true},"provider":{"type":"string","description":"The provider of the AI service","example":"OpenAI","readOnly":true},"totalCost":{"type":["number","null"],"description":"The total cost of the transaction. Null indicates no pricing configuration was found.","example":0.00021,"readOnly":true},"costType":{"type":["string","null"],"description":"The type of cost associated with the transaction","enum":["AI","TEXT_TOKEN_INPUT","TEXT_TOKEN_OUTPUT","TEXT_TOKEN_CACHE_CREATION","TEXT_TOKEN_CACHE_READ","IMAGE_GENERATION","AUDIO_TRANSCRIPTION","AUDIO_GENERATION","VIDEO_GENERATION","CREDITS"],"example":"AI","readOnly":true},"requestTime":{"type":"string","description":"The time when the request was made (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:00Z","readOnly":true},"responseTime":{"type":"string","description":"The time when the response was received (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:01Z","readOnly":true},"requestDuration":{"type":"integer","format":"int64","description":"The total duration of the request in milliseconds","example":1200,"readOnly":true},"operationType":{"type":["string","null"],"description":"The type of operation performed","enum":["CHAT","GENERATE","EMBED","CLASSIFY","SUMMARIZE","TRANSLATE","OTHER","TOOL_CALL","RERANK","SEARCH","MODERATION","VISION","TRANSFORM","GUARDRAIL","AUDIO","VIDEO","IMAGE"],"example":"CHAT","readOnly":true},"operationSubtype":{"type":["string","null"],"description":"Technical classification of the operation (web_search, function_call, etc.)","example":"web_search","readOnly":true},"taskType":{"type":["string","null"],"description":"The type of task performed","example":"completion","readOnly":true},"agent":{"type":["string","null"],"description":"The agent name","example":"Bishop","readOnly":true},"parentTransactionId":{"type":["string","null"],"description":"Alias for parentSpanId. Both fields contain the same value.","example":"parent-txn-123e4567-e89b-12d3-a456-426614174000","readOnly":true},"parentSpanId":{"type":["string","null"],"description":"Parent span ID for hierarchical tracing.","example":"parent-txn-123e4567-e89b-12d3-a456-426614174000","readOnly":true},"transactionName":{"type":["string","null"],"description":"Human-readable name for this transaction","example":"Summarize Application","readOnly":true},"traceType":{"type":["string","null"],"description":"Categorical identifier for grouping similar workflows","example":"document_analysis","readOnly":true},"traceName":{"type":["string","null"],"description":"Human-readable label for individual trace instances","example":"Customer Onboarding - Acme Corp","readOnly":true},"transactionCount":{"type":["integer","null"],"format":"int64","description":"Total number of transactions sharing the same traceId across all pages. For records with null traceId, this returns 1.","example":4,"readOnly":true},"squadId":{"type":["string","null"],"description":"Identifier for multi-agent framework team or squad","example":"research-squad","readOnly":true},"environment":{"type":["string","null"],"description":"Deployment environment (production, staging, development, test)","example":"production","readOnly":true},"region":{"type":["string","null"],"description":"Cloud region or geographic location","example":"us-east-1","readOnly":true},"retryNumber":{"type":["integer","null"],"format":"int32","description":"Retry attempt number (0 = first attempt, 1 = first retry, etc.)","example":0,"readOnly":true},"middlewareSource":{"type":["string","null"],"description":"The source middleware or SDK that generated this AI request","example":"openai-python-sdk","readOnly":true},"errorCode":{"type":["integer","null"],"format":"int32","description":"The error code if an error occurred","example":429,"readOnly":true},"errorReason":{"type":["string","null"],"description":"The details of the error that occurred","example":"Rate limit exceeded","readOnly":true},"billingSkipped":{"type":["boolean","null"],"description":"Whether billing was skipped for this transaction","example":false,"readOnly":true},"skipReason":{"type":["string","null"],"description":"The reason billing was skipped","enum":["FREE_TIER","RATE_LIMITED","QUOTA_EXCEEDED","CONTENT_POLICY_VIOLATION","CAPACITY_UNAVAILABLE","SERVICE_UNAVAILABLE"],"example":"FREE_TIER","readOnly":true},"pricingTier":{"type":["string","null"],"description":"The pricing tier for discount calculation","enum":["STANDARD","BATCH"],"example":"STANDARD","readOnly":true},"billingUnit":{"type":["string","null"],"description":"The unit of billing (PER_TOKEN, PER_CHARACTER, PER_MINUTE, PER_SECOND, PER_IMAGE, CREDITS)","enum":["PER_TOKEN","PER_IMAGE","PER_SECOND","PER_MINUTE","PER_CHARACTER","CREDITS"],"example":"PER_TOKEN","readOnly":true},"requestedServiceTier":{"type":["string","null"],"description":"The service tier requested by the client","example":"default","readOnly":true},"actualServiceTier":{"type":["string","null"],"description":"The actual service tier used for the request","example":"scale","readOnly":true},"inputMessages":{"type":["string","null"],"description":"Input prompts/messages as JSON array. Only included when prompt capture is enabled.","readOnly":true},"outputResponse":{"type":["string","null"],"description":"Output response content as JSON. Only included when prompt capture is enabled.","readOnly":true},"promptsTruncated":{"type":["boolean","null"],"description":"Indicates if prompts were truncated due to size limits.","example":false,"readOnly":true},"hasPromptData":{"type":"boolean","description":"True if any prompt data is present (inputMessages, outputResponse, or systemPrompt for completions).","example":true,"readOnly":true},"inputTokenCount":{"type":["integer","null"],"format":"int64","description":"The number of tokens in the input. Null for non-completion metrics.","example":50,"readOnly":true},"outputTokenCount":{"type":["integer","null"],"format":"int64","description":"The number of tokens in the output. Null for non-completion metrics.","example":150,"readOnly":true},"totalTokenCount":{"type":["integer","null"],"format":"int64","description":"The total number of tokens used. Null for non-completion metrics.","example":200,"readOnly":true},"reasoningTokenCount":{"type":["integer","null"],"format":"int64","description":"The number of tokens used for reasoning. Null for non-completion metrics.","example":100,"readOnly":true},"cachedTokenCount":{"type":["integer","null"],"format":"int64","description":"The number of tokens retrieved from cache. Null for non-completion metrics.","example":20,"readOnly":true},"cacheCreationTokenCount":{"type":["integer","null"],"format":"int64","description":"The number of cached creation tokens. Null for non-completion metrics.","example":1300,"readOnly":true},"cacheReadTokenCount":{"type":["integer","null"],"format":"int64","description":"The number of cached read tokens. Null for non-completion metrics.","example":1300,"readOnly":true},"tokensPerMinute":{"type":["number","null"],"format":"double","description":"The number of tokens processed per minute. Null for non-completion metrics.","example":52.12,"readOnly":true},"inputTokenCost":{"type":["number","null"],"description":"The input token cost of the transaction. Null for non-completion metrics.","example":0.0005,"readOnly":true},"outputTokenCost":{"type":["number","null"],"description":"The output token cost of the transaction. Null for non-completion metrics.","example":0.00021,"readOnly":true},"stopReason":{"type":["string","null"],"description":"The reason for stopping the completion. Null for non-completion metrics.","enum":["END","END_SEQUENCE","TIMEOUT","TOKEN_LIMIT","COST_LIMIT","COMPLETION_LIMIT","ERROR","CANCELLED","CONTENT_FILTER","TOOL_CALL"],"example":"END","readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["id","label","metricType","resourceType"]},"EntityModelAIMetricResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the AI metric","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"ai_metric","readOnly":true},"label":{"type":"string","description":"The AI metric's label (automatically set to the transaction ID for display purposes)","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"metricType":{"type":"string","description":"The type of AI metric (modality)","enum":["COMPLETION","AUDIO","VIDEO","IMAGE"],"example":"COMPLETION","readOnly":true},"transactionId":{"type":"string","description":"Alias for spanId. Both fields contain the same value.","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"spanId":{"type":"string","description":"Unique identifier for this transaction.","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"traceId":{"type":["string","null"],"description":"Trace multiple AI operations belonging to same overall request","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"source":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"team":{"$ref":"#/components/schemas/ResourceMetadata_Read","description":"The team (organization)","readOnly":true},"organization":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscriberCredential":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"product":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscriptionId":{"type":["string","null"],"description":"The subscription ID","readOnly":true},"subscriberEmail":{"type":["string","null"],"description":"The subscriber email","readOnly":true},"subscriberId":{"type":["string","null"],"description":"The ID of the subscriber from your system","example":"user-123","readOnly":true},"model":{"type":"string","description":"The AI model used","example":"gpt-4o","readOnly":true},"modelSource":{"type":["string","null"],"description":"The source of the AI model","example":"OPENAI","readOnly":true},"provider":{"type":"string","description":"The provider of the AI service","example":"OpenAI","readOnly":true},"totalCost":{"type":["number","null"],"description":"The total cost of the transaction. Null indicates no pricing configuration was found.","example":0.00021,"readOnly":true},"costType":{"type":["string","null"],"description":"The type of cost associated with the transaction","enum":["AI","TEXT_TOKEN_INPUT","TEXT_TOKEN_OUTPUT","TEXT_TOKEN_CACHE_CREATION","TEXT_TOKEN_CACHE_READ","IMAGE_GENERATION","AUDIO_TRANSCRIPTION","AUDIO_GENERATION","VIDEO_GENERATION","CREDITS"],"example":"AI","readOnly":true},"requestTime":{"type":"string","description":"The time when the request was made (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:00Z","readOnly":true},"responseTime":{"type":"string","description":"The time when the response was received (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:01Z","readOnly":true},"requestDuration":{"type":"integer","format":"int64","description":"The total duration of the request in milliseconds","example":1200,"readOnly":true},"operationType":{"type":["string","null"],"description":"The type of operation performed","enum":["CHAT","GENERATE","EMBED","CLASSIFY","SUMMARIZE","TRANSLATE","OTHER","TOOL_CALL","RERANK","SEARCH","MODERATION","VISION","TRANSFORM","GUARDRAIL","AUDIO","VIDEO","IMAGE"],"example":"CHAT","readOnly":true},"operationSubtype":{"type":["string","null"],"description":"Technical classification of the operation (web_search, function_call, etc.)","example":"web_search","readOnly":true},"taskType":{"type":["string","null"],"description":"The type of task performed","example":"completion","readOnly":true},"agent":{"type":["string","null"],"description":"The agent name","example":"Bishop","readOnly":true},"parentTransactionId":{"type":["string","null"],"description":"Alias for parentSpanId. Both fields contain the same value.","example":"parent-txn-123e4567-e89b-12d3-a456-426614174000","readOnly":true},"parentSpanId":{"type":["string","null"],"description":"Parent span ID for hierarchical tracing.","example":"parent-txn-123e4567-e89b-12d3-a456-426614174000","readOnly":true},"transactionName":{"type":["string","null"],"description":"Human-readable name for this transaction","example":"Summarize Application","readOnly":true},"traceType":{"type":["string","null"],"description":"Categorical identifier for grouping similar workflows","example":"document_analysis","readOnly":true},"traceName":{"type":["string","null"],"description":"Human-readable label for individual trace instances","example":"Customer Onboarding - Acme Corp","readOnly":true},"transactionCount":{"type":["integer","null"],"format":"int64","description":"Total number of transactions sharing the same traceId across all pages. For records with null traceId, this returns 1.","example":4,"readOnly":true},"squadId":{"type":["string","null"],"description":"Identifier for multi-agent framework team or squad","example":"research-squad","readOnly":true},"environment":{"type":["string","null"],"description":"Deployment environment (production, staging, development, test)","example":"production","readOnly":true},"region":{"type":["string","null"],"description":"Cloud region or geographic location","example":"us-east-1","readOnly":true},"retryNumber":{"type":["integer","null"],"format":"int32","description":"Retry attempt number (0 = first attempt, 1 = first retry, etc.)","example":0,"readOnly":true},"middlewareSource":{"type":["string","null"],"description":"The source middleware or SDK that generated this AI request","example":"openai-python-sdk","readOnly":true},"errorCode":{"type":["integer","null"],"format":"int32","description":"The error code if an error occurred","example":429,"readOnly":true},"errorReason":{"type":["string","null"],"description":"The details of the error that occurred","example":"Rate limit exceeded","readOnly":true},"billingSkipped":{"type":["boolean","null"],"description":"Whether billing was skipped for this transaction","example":false,"readOnly":true},"skipReason":{"type":["string","null"],"description":"The reason billing was skipped","enum":["FREE_TIER","RATE_LIMITED","QUOTA_EXCEEDED","CONTENT_POLICY_VIOLATION","CAPACITY_UNAVAILABLE","SERVICE_UNAVAILABLE"],"example":"FREE_TIER","readOnly":true},"pricingTier":{"type":["string","null"],"description":"The pricing tier for discount calculation","enum":["STANDARD","BATCH"],"example":"STANDARD","readOnly":true},"billingUnit":{"type":["string","null"],"description":"The unit of billing (PER_TOKEN, PER_CHARACTER, PER_MINUTE, PER_SECOND, PER_IMAGE, CREDITS)","enum":["PER_TOKEN","PER_IMAGE","PER_SECOND","PER_MINUTE","PER_CHARACTER","CREDITS"],"example":"PER_TOKEN","readOnly":true},"requestedServiceTier":{"type":["string","null"],"description":"The service tier requested by the client","example":"default","readOnly":true},"actualServiceTier":{"type":["string","null"],"description":"The actual service tier used for the request","example":"scale","readOnly":true},"inputMessages":{"type":["string","null"],"description":"Input prompts/messages as JSON array. Only included when prompt capture is enabled.","readOnly":true},"outputResponse":{"type":["string","null"],"description":"Output response content as JSON. Only included when prompt capture is enabled.","readOnly":true},"promptsTruncated":{"type":["boolean","null"],"description":"Indicates if prompts were truncated due to size limits.","example":false,"readOnly":true},"hasPromptData":{"type":"boolean","description":"True if any prompt data is present (inputMessages, outputResponse, or systemPrompt for completions).","example":true,"readOnly":true},"inputTokenCount":{"type":["integer","null"],"format":"int64","description":"The number of tokens in the input. Null for non-completion metrics.","example":50,"readOnly":true},"outputTokenCount":{"type":["integer","null"],"format":"int64","description":"The number of tokens in the output. Null for non-completion metrics.","example":150,"readOnly":true},"totalTokenCount":{"type":["integer","null"],"format":"int64","description":"The total number of tokens used. Null for non-completion metrics.","example":200,"readOnly":true},"reasoningTokenCount":{"type":["integer","null"],"format":"int64","description":"The number of tokens used for reasoning. Null for non-completion metrics.","example":100,"readOnly":true},"cachedTokenCount":{"type":["integer","null"],"format":"int64","description":"The number of tokens retrieved from cache. Null for non-completion metrics.","example":20,"readOnly":true},"cacheCreationTokenCount":{"type":["integer","null"],"format":"int64","description":"The number of cached creation tokens. Null for non-completion metrics.","example":1300,"readOnly":true},"cacheReadTokenCount":{"type":["integer","null"],"format":"int64","description":"The number of cached read tokens. Null for non-completion metrics.","example":1300,"readOnly":true},"tokensPerMinute":{"type":["number","null"],"format":"double","description":"The number of tokens processed per minute. Null for non-completion metrics.","example":52.12,"readOnly":true},"inputTokenCost":{"type":["number","null"],"description":"The input token cost of the transaction. Null for non-completion metrics.","example":0.0005,"readOnly":true},"outputTokenCost":{"type":["number","null"],"description":"The output token cost of the transaction. Null for non-completion metrics.","example":0.00021,"readOnly":true},"stopReason":{"type":["string","null"],"description":"The reason for stopping the completion. Null for non-completion metrics.","enum":["END","END_SEQUENCE","TIMEOUT","TOKEN_LIMIT","COST_LIMIT","COMPLETION_LIMIT","ERROR","CANCELLED","CONTENT_FILTER","TOOL_CALL"],"example":"END","readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["id","label","metricType","resourceType"]},"AIVideoMetricPagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"aIVideoMetricResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelAIVideoMetricResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"AIVideoMetricResource_Read":{"type":"object","description":"AI Video metric record with video-specific fields","properties":{"id":{"type":"string","description":"The unique identifier of the AI video metric","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"ai.video.metric","readOnly":true},"label":{"type":"string","description":"The AI video metric's label (automatically set to the transaction ID for display purposes)","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"transactionId":{"type":"string","description":"Alias for spanId. Both fields contain the same value.","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"spanId":{"type":"string","description":"Unique identifier for this transaction.","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"traceId":{"type":["string","null"],"description":"Trace multiple AI operations belonging to same overall request","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"source":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"team":{"$ref":"#/components/schemas/ResourceMetadata_Read","description":"The team (organization)","readOnly":true},"organization":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscriberCredential":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"product":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscriptionId":{"type":["string","null"],"description":"The subscription ID","readOnly":true},"subscriberEmail":{"type":["string","null"],"description":"The subscriber email","readOnly":true},"subscriberId":{"type":["string","null"],"description":"The ID of the subscriber from your system","example":"user-123","readOnly":true},"model":{"type":"string","description":"The AI model used","example":"gen-3","readOnly":true},"modelSource":{"type":["string","null"],"description":"The source of the AI model","example":"RUNWAY","readOnly":true},"provider":{"type":"string","description":"The provider of the AI service","example":"RunwayML","readOnly":true},"totalCost":{"type":["number","null"],"description":"The total cost of the transaction. Null indicates pricing is not configured for this model/provider.","example":0.5,"readOnly":true},"costType":{"type":["string","null"],"description":"The type of cost associated with the transaction","enum":["AI","TEXT_TOKEN_INPUT","TEXT_TOKEN_OUTPUT","TEXT_TOKEN_CACHE_CREATION","TEXT_TOKEN_CACHE_READ","IMAGE_GENERATION","AUDIO_TRANSCRIPTION","AUDIO_GENERATION","VIDEO_GENERATION","CREDITS"],"example":"AI","readOnly":true},"requestTime":{"type":"string","description":"The time when the request was made (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:00Z","readOnly":true},"responseTime":{"type":"string","description":"The time when the response was received (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:30Z","readOnly":true},"requestDuration":{"type":"integer","format":"int64","description":"The total duration of the request in milliseconds","example":30000,"readOnly":true},"operationType":{"type":["string","null"],"description":"The type of operation performed","enum":["CHAT","GENERATE","EMBED","CLASSIFY","SUMMARIZE","TRANSLATE","OTHER","TOOL_CALL","RERANK","SEARCH","MODERATION","VISION","TRANSFORM","GUARDRAIL","AUDIO","VIDEO","IMAGE"],"example":"VIDEO","readOnly":true},"operationSubtype":{"type":["string","null"],"description":"Technical classification of the operation (generation, upscale, extend, edit)","example":"generation","readOnly":true},"taskType":{"type":["string","null"],"description":"The type of task performed","example":"video_generation","readOnly":true},"agent":{"type":["string","null"],"description":"The agent name","example":"video-gen-agent","readOnly":true},"parentTransactionId":{"type":["string","null"],"description":"Alias for parentSpanId. Both fields contain the same value.","example":"parent-txn-123e4567-e89b-12d3-a456-426614174000","readOnly":true},"parentSpanId":{"type":["string","null"],"description":"Parent span ID for hierarchical tracing.","example":"parent-txn-123e4567-e89b-12d3-a456-426614174000","readOnly":true},"transactionName":{"type":["string","null"],"description":"Human-readable name for this transaction","example":"Generate Marketing Video","readOnly":true},"traceType":{"type":["string","null"],"description":"Categorical identifier for grouping similar workflows","example":"video_generation","readOnly":true},"traceName":{"type":["string","null"],"description":"Human-readable label for individual trace instances","example":"Marketing Video Q4 2025","readOnly":true},"squadId":{"type":["string","null"],"description":"Identifier for multi-agent framework team or squad","example":"content-creation-squad","readOnly":true},"environment":{"type":["string","null"],"description":"Deployment environment (production, staging, development, test)","example":"production","readOnly":true},"region":{"type":["string","null"],"description":"Cloud region or geographic location","example":"us-east-1","readOnly":true},"retryNumber":{"type":["integer","null"],"format":"int32","description":"Retry attempt number (0 = first attempt, 1 = first retry, etc.)","example":0,"readOnly":true},"middlewareSource":{"type":["string","null"],"description":"The source middleware or SDK that generated this AI request","example":"runway-sdk","readOnly":true},"errorCode":{"type":["integer","null"],"format":"int32","description":"The error code if an error occurred","example":429,"readOnly":true},"errorReason":{"type":["string","null"],"description":"The details of the error that occurred","example":"Rate limit exceeded","readOnly":true},"billingSkipped":{"type":["boolean","null"],"description":"Whether billing was skipped for this transaction","example":false,"readOnly":true},"skipReason":{"type":["string","null"],"description":"The reason billing was skipped","enum":["FREE_TIER","RATE_LIMITED","QUOTA_EXCEEDED","CONTENT_POLICY_VIOLATION","CAPACITY_UNAVAILABLE","SERVICE_UNAVAILABLE"],"example":"FREE_TIER","readOnly":true},"pricingTier":{"type":["string","null"],"description":"The pricing tier for discount calculation","enum":["STANDARD","BATCH"],"example":"STANDARD","readOnly":true},"billingUnit":{"type":["string","null"],"description":"The unit of billing (CREDITS, PER_SECOND)","enum":["PER_TOKEN","PER_IMAGE","PER_SECOND","PER_MINUTE","PER_CHARACTER","CREDITS"],"example":"CREDITS","readOnly":true},"requestedServiceTier":{"type":["string","null"],"description":"The service tier requested by the client","example":"standard","readOnly":true},"actualServiceTier":{"type":["string","null"],"description":"The actual service tier used for the request","example":"turbo","readOnly":true},"durationSeconds":{"type":["number","null"],"format":"double","description":"The duration of the generated video in seconds","example":10,"readOnly":true},"fps":{"type":["integer","null"],"format":"int32","description":"Frames per second of the generated video","example":30,"readOnly":true},"resolution":{"type":["string","null"],"description":"Video resolution (e.g., 1080p, 4k)","example":"1080p","readOnly":true},"creditsConsumed":{"type":["number","null"],"format":"double","description":"Number of credits consumed for this video generation","example":10,"readOnly":true},"videoJobId":{"type":["string","null"],"description":"Video job ID for async video generation operations. Named videoJobId to distinguish from other async job types.","example":"job-12345-abcde","readOnly":true},"requestedDurationSeconds":{"type":["number","null"],"format":"double","description":"The requested duration in seconds (may differ from actual)","example":15,"readOnly":true},"creditRate":{"type":["number","null"],"format":"double","description":"Credit rate per second or per operation","example":1,"readOnly":true},"asyncOperation":{"type":["boolean","null"],"description":"Whether this was an async video generation operation","example":true,"readOnly":true},"completionStatus":{"type":["string","null"],"description":"Status of the video generation operation","enum":["SUCCESS","PARTIAL_TIMEOUT","FAILED"],"example":"SUCCESS","readOnly":true},"sourceTransactionId":{"type":["string","null"],"description":"Reference to the source transaction (for extend/edit operations)","example":"src-txn-12345","readOnly":true},"priorityTier":{"type":["string","null"],"description":"Priority tier for the video generation queue","example":"standard","readOnly":true},"inputMessages":{"type":["string","null"],"description":"Input prompts/messages as JSON array. Only included when prompt capture is enabled.","readOnly":true},"outputResponse":{"type":["string","null"],"description":"Output response content as JSON. Only included when prompt capture is enabled.","readOnly":true},"promptsTruncated":{"type":["boolean","null"],"description":"Indicates if prompts were truncated due to size limits.","example":false,"readOnly":true},"hasPromptData":{"type":"boolean","description":"True if inputMessages or outputResponse is present.","example":true,"readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["id","label","resourceType"]},"EntityModelAIVideoMetricResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the AI video metric","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"ai.video.metric","readOnly":true},"label":{"type":"string","description":"The AI video metric's label (automatically set to the transaction ID for display purposes)","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"transactionId":{"type":"string","description":"Alias for spanId. Both fields contain the same value.","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"spanId":{"type":"string","description":"Unique identifier for this transaction.","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"traceId":{"type":["string","null"],"description":"Trace multiple AI operations belonging to same overall request","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"source":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"team":{"$ref":"#/components/schemas/ResourceMetadata_Read","description":"The team (organization)","readOnly":true},"organization":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscriberCredential":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"product":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscriptionId":{"type":["string","null"],"description":"The subscription ID","readOnly":true},"subscriberEmail":{"type":["string","null"],"description":"The subscriber email","readOnly":true},"subscriberId":{"type":["string","null"],"description":"The ID of the subscriber from your system","example":"user-123","readOnly":true},"model":{"type":"string","description":"The AI model used","example":"gen-3","readOnly":true},"modelSource":{"type":["string","null"],"description":"The source of the AI model","example":"RUNWAY","readOnly":true},"provider":{"type":"string","description":"The provider of the AI service","example":"RunwayML","readOnly":true},"totalCost":{"type":["number","null"],"description":"The total cost of the transaction. Null indicates pricing is not configured for this model/provider.","example":0.5,"readOnly":true},"costType":{"type":["string","null"],"description":"The type of cost associated with the transaction","enum":["AI","TEXT_TOKEN_INPUT","TEXT_TOKEN_OUTPUT","TEXT_TOKEN_CACHE_CREATION","TEXT_TOKEN_CACHE_READ","IMAGE_GENERATION","AUDIO_TRANSCRIPTION","AUDIO_GENERATION","VIDEO_GENERATION","CREDITS"],"example":"AI","readOnly":true},"requestTime":{"type":"string","description":"The time when the request was made (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:00Z","readOnly":true},"responseTime":{"type":"string","description":"The time when the response was received (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:30Z","readOnly":true},"requestDuration":{"type":"integer","format":"int64","description":"The total duration of the request in milliseconds","example":30000,"readOnly":true},"operationType":{"type":["string","null"],"description":"The type of operation performed","enum":["CHAT","GENERATE","EMBED","CLASSIFY","SUMMARIZE","TRANSLATE","OTHER","TOOL_CALL","RERANK","SEARCH","MODERATION","VISION","TRANSFORM","GUARDRAIL","AUDIO","VIDEO","IMAGE"],"example":"VIDEO","readOnly":true},"operationSubtype":{"type":["string","null"],"description":"Technical classification of the operation (generation, upscale, extend, edit)","example":"generation","readOnly":true},"taskType":{"type":["string","null"],"description":"The type of task performed","example":"video_generation","readOnly":true},"agent":{"type":["string","null"],"description":"The agent name","example":"video-gen-agent","readOnly":true},"parentTransactionId":{"type":["string","null"],"description":"Alias for parentSpanId. Both fields contain the same value.","example":"parent-txn-123e4567-e89b-12d3-a456-426614174000","readOnly":true},"parentSpanId":{"type":["string","null"],"description":"Parent span ID for hierarchical tracing.","example":"parent-txn-123e4567-e89b-12d3-a456-426614174000","readOnly":true},"transactionName":{"type":["string","null"],"description":"Human-readable name for this transaction","example":"Generate Marketing Video","readOnly":true},"traceType":{"type":["string","null"],"description":"Categorical identifier for grouping similar workflows","example":"video_generation","readOnly":true},"traceName":{"type":["string","null"],"description":"Human-readable label for individual trace instances","example":"Marketing Video Q4 2025","readOnly":true},"squadId":{"type":["string","null"],"description":"Identifier for multi-agent framework team or squad","example":"content-creation-squad","readOnly":true},"environment":{"type":["string","null"],"description":"Deployment environment (production, staging, development, test)","example":"production","readOnly":true},"region":{"type":["string","null"],"description":"Cloud region or geographic location","example":"us-east-1","readOnly":true},"retryNumber":{"type":["integer","null"],"format":"int32","description":"Retry attempt number (0 = first attempt, 1 = first retry, etc.)","example":0,"readOnly":true},"middlewareSource":{"type":["string","null"],"description":"The source middleware or SDK that generated this AI request","example":"runway-sdk","readOnly":true},"errorCode":{"type":["integer","null"],"format":"int32","description":"The error code if an error occurred","example":429,"readOnly":true},"errorReason":{"type":["string","null"],"description":"The details of the error that occurred","example":"Rate limit exceeded","readOnly":true},"billingSkipped":{"type":["boolean","null"],"description":"Whether billing was skipped for this transaction","example":false,"readOnly":true},"skipReason":{"type":["string","null"],"description":"The reason billing was skipped","enum":["FREE_TIER","RATE_LIMITED","QUOTA_EXCEEDED","CONTENT_POLICY_VIOLATION","CAPACITY_UNAVAILABLE","SERVICE_UNAVAILABLE"],"example":"FREE_TIER","readOnly":true},"pricingTier":{"type":["string","null"],"description":"The pricing tier for discount calculation","enum":["STANDARD","BATCH"],"example":"STANDARD","readOnly":true},"billingUnit":{"type":["string","null"],"description":"The unit of billing (CREDITS, PER_SECOND)","enum":["PER_TOKEN","PER_IMAGE","PER_SECOND","PER_MINUTE","PER_CHARACTER","CREDITS"],"example":"CREDITS","readOnly":true},"requestedServiceTier":{"type":["string","null"],"description":"The service tier requested by the client","example":"standard","readOnly":true},"actualServiceTier":{"type":["string","null"],"description":"The actual service tier used for the request","example":"turbo","readOnly":true},"durationSeconds":{"type":["number","null"],"format":"double","description":"The duration of the generated video in seconds","example":10,"readOnly":true},"fps":{"type":["integer","null"],"format":"int32","description":"Frames per second of the generated video","example":30,"readOnly":true},"resolution":{"type":["string","null"],"description":"Video resolution (e.g., 1080p, 4k)","example":"1080p","readOnly":true},"creditsConsumed":{"type":["number","null"],"format":"double","description":"Number of credits consumed for this video generation","example":10,"readOnly":true},"videoJobId":{"type":["string","null"],"description":"Video job ID for async video generation operations. Named videoJobId to distinguish from other async job types.","example":"job-12345-abcde","readOnly":true},"requestedDurationSeconds":{"type":["number","null"],"format":"double","description":"The requested duration in seconds (may differ from actual)","example":15,"readOnly":true},"creditRate":{"type":["number","null"],"format":"double","description":"Credit rate per second or per operation","example":1,"readOnly":true},"asyncOperation":{"type":["boolean","null"],"description":"Whether this was an async video generation operation","example":true,"readOnly":true},"completionStatus":{"type":["string","null"],"description":"Status of the video generation operation","enum":["SUCCESS","PARTIAL_TIMEOUT","FAILED"],"example":"SUCCESS","readOnly":true},"sourceTransactionId":{"type":["string","null"],"description":"Reference to the source transaction (for extend/edit operations)","example":"src-txn-12345","readOnly":true},"priorityTier":{"type":["string","null"],"description":"Priority tier for the video generation queue","example":"standard","readOnly":true},"inputMessages":{"type":["string","null"],"description":"Input prompts/messages as JSON array. Only included when prompt capture is enabled.","readOnly":true},"outputResponse":{"type":["string","null"],"description":"Output response content as JSON. Only included when prompt capture is enabled.","readOnly":true},"promptsTruncated":{"type":["boolean","null"],"description":"Indicates if prompts were truncated due to size limits.","example":false,"readOnly":true},"hasPromptData":{"type":"boolean","description":"True if inputMessages or outputResponse is present.","example":true,"readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["id","label","resourceType"]},"AITracePagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"aITraceResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelAITraceResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"EntityModelAITraceResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the AI trace","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"ai.trace.metric","readOnly":true},"label":{"type":"string","description":"The trace identifier label","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (not applicable for aggregated traces)","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (not applicable for aggregated traces)","readOnly":true},"traceTypes":{"type":"array","description":"List of distinct categorical identifiers for grouping similar workflows (e.g., 'create_video', 'write_script')","example":["document_analysis","video_creation"],"items":{"type":"string"},"readOnly":true},"operationTypes":{"type":"array","description":"List of distinct operation types in this trace","example":["CHAT","IMAGE"],"items":{"type":"string","enum":["CHAT","GENERATE","EMBED","CLASSIFY","SUMMARIZE","TRANSLATE","OTHER","TOOL_CALL","RERANK","SEARCH","MODERATION","VISION","TRANSFORM","GUARDRAIL","AUDIO","VIDEO","IMAGE"]},"readOnly":true},"traceName":{"type":["string","null"],"description":"Human-readable name for this trace","example":"Marketing Video Q4 2025","readOnly":true},"agent":{"type":["string","null"],"description":"The agent name from the transactions in this trace","example":"agent-delta","readOnly":true},"squadId":{"type":["string","null"],"description":"Identifier for multi-agent framework team or squad (e.g., ARK, CrewAI). Used to group AI operations by agent team for analytics and cost tracking.","example":"research-squad","readOnly":true},"startTime":{"type":"string","description":"The earliest request time across all transactions in this trace (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:00Z","readOnly":true},"endTime":{"type":"string","description":"The latest response time across all transactions in this trace (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:10Z","readOnly":true},"traceDuration":{"type":"integer","format":"int64","description":"The total elapsed time of the trace in milliseconds, calculated as (endTime - startTime)","example":11163,"readOnly":true},"status":{"type":"string","description":"Overall status of the trace: SUCCESS (no errors), PARTIAL (some errors), FAILED (all errors)","example":"SUCCESS","readOnly":true},"transactionCount":{"type":"integer","format":"int32","description":"The total number of transactions in this trace","example":5,"readOnly":true},"errorCount":{"type":"integer","format":"int32","description":"The number of failed transactions (where errorReason is not null)","example":1,"readOnly":true},"models":{"type":"array","description":"List of distinct AI models used in this trace","example":["claude-3-5-sonnet-latest","gpt-4"],"items":{"type":"string"},"readOnly":true},"providers":{"type":"array","description":"List of distinct AI providers used in this trace","example":["Anthropic","OpenAI"],"items":{"type":"string"},"readOnly":true},"inputTokens":{"type":"integer","format":"int64","description":"The total number of input tokens used across all transactions in this trace","example":500,"readOnly":true},"outputTokens":{"type":"integer","format":"int64","description":"The total number of output tokens used across all transactions in this trace","example":1000,"readOnly":true},"totalTokens":{"type":"integer","format":"int64","description":"The total number of tokens used across all transactions in this trace","example":1500,"readOnly":true},"totalCost":{"type":["number","null"],"description":"The total cost across all transactions in this trace. Transactions with missing pricing configuration are treated as zero cost in the aggregation. Check individual transaction totalCost to identify metrics with unconfigured pricing (null values).","example":0.0024,"readOnly":true},"environment":{"type":["string","null"],"description":"Deployment environment (production, staging, development, test)","example":"production","readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["endTime","errorCount","id","inputTokens","label","models","operationTypes","outputTokens","providers","resourceType","startTime","status","totalTokens","traceDuration","traceTypes","transactionCount"]},"AITraceDetailResource_Read":{"type":"object","description":"Detailed AI trace metric with breakdowns and analytics","properties":{"id":{"type":"string","description":"The unique identifier of the trace (traceId)","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"ai.trace.detail","readOnly":true},"label":{"type":"string","description":"The trace's label (automatically set to the traceId for display purposes)","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"traceTypes":{"type":"array","description":"List of distinct categorical identifiers for grouping similar workflows","example":["document_analysis","video_creation"],"items":{"type":"string"},"readOnly":true},"operationTypes":{"type":"array","description":"List of distinct operation types in this trace","example":["CHAT","IMAGE"],"items":{"type":"string","enum":["CHAT","GENERATE","EMBED","CLASSIFY","SUMMARIZE","TRANSLATE","OTHER","TOOL_CALL","RERANK","SEARCH","MODERATION","VISION","TRANSFORM","GUARDRAIL","AUDIO","VIDEO","IMAGE"]},"readOnly":true},"traceName":{"type":["string","null"],"description":"Human-readable label for individual trace instances","example":"Customer Onboarding - Acme Corp","readOnly":true},"agent":{"type":["string","null"],"description":"The agent that executed this trace","example":"Bishop","readOnly":true},"squadId":{"type":["string","null"],"description":"Identifier for multi-agent framework team or squad (e.g., ARK, CrewAI). Used to group AI operations by agent team for analytics and cost tracking.","example":"research-squad","readOnly":true},"startTime":{"type":"string","description":"The start time of the trace (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:00Z","readOnly":true},"endTime":{"type":"string","description":"The end time of the trace (ISO 8601 extended date-time format)","example":"2025-09-01T00:01:30Z","readOnly":true},"traceDuration":{"type":"integer","format":"int64","description":"The total elapsed time of the trace in milliseconds (wall-clock time from start to finish)","example":90000,"readOnly":true},"totalDurationSum":{"type":"integer","format":"int64","description":"The sum of all individual request durations in milliseconds (may exceed traceDuration if requests run in parallel)","example":150000,"readOnly":true},"transactionCount":{"type":"integer","format":"int32","description":"The number of transactions in this trace","example":15,"readOnly":true},"errorCount":{"type":"integer","format":"int32","description":"The number of failed transactions in this trace","example":2,"readOnly":true},"models":{"type":"array","description":"List of distinct AI models used in this trace","example":["gpt-4","claude-3"],"items":{"type":"string"},"readOnly":true},"providers":{"type":"array","description":"List of distinct AI providers used in this trace","example":["OpenAI","Anthropic"],"items":{"type":"string"},"readOnly":true},"inputTokens":{"type":"integer","format":"int64","description":"Total number of input tokens across all transactions","example":5000,"readOnly":true},"outputTokens":{"type":"integer","format":"int64","description":"Total number of output tokens across all transactions","example":3000,"readOnly":true},"totalTokens":{"type":"integer","format":"int64","description":"Total number of tokens across all transactions","example":8000,"readOnly":true},"totalCost":{"type":["number","null"],"description":"The total cost across all transactions in this trace. Transactions with missing pricing configuration are treated as zero cost in the aggregation. Check individual transaction totalCost to identify metrics with unconfigured pricing (null values).","example":0.0024,"readOnly":true},"environment":{"type":["string","null"],"description":"Deployment environment (production, staging, development, test)","example":"production","readOnly":true},"status":{"type":"string","description":"Overall status of the trace (SUCCESS, FAILED, PARTIAL)","example":"SUCCESS","readOnly":true},"taskTypes":{"type":"array","description":"List of distinct task types used in this trace","example":["completion","embedding"],"items":{"type":"string"},"readOnly":true},"timeToFirstToken":{"type":["integer","null"],"format":"int64","description":"Time to first token (in milliseconds) from the first transaction in this trace","example":250,"readOnly":true},"subscriberEmail":{"type":["string","null"],"description":"Email address of the subscriber associated with this trace","example":"user@example.com","readOnly":true},"organizationName":{"type":["string","null"],"description":"Name of the consuming organization","example":"Acme Corporation","readOnly":true},"productName":{"type":["string","null"],"description":"Name of the product associated with this trace","example":"Premium AI API","readOnly":true},"topModelsByCost":{"type":"array","description":"Top 5 models by cost within this trace","items":{"$ref":"#/components/schemas/InsightItem_Read"},"readOnly":true},"topProvidersByCost":{"type":"array","description":"Top 5 providers by cost within this trace","items":{"$ref":"#/components/schemas/InsightItem_Read"},"readOnly":true},"topTaskTypesByDuration":{"type":"array","description":"Top 5 task types by duration within this trace","items":{"$ref":"#/components/schemas/InsightItem_Read"},"readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["endTime","errorCount","id","inputTokens","label","models","operationTypes","outputTokens","providers","resourceType","startTime","status","taskTypes","topModelsByCost","topProvidersByCost","topTaskTypesByDuration","totalDurationSum","totalTokens","traceDuration","traceTypes","transactionCount"]},"InsightItem_Read":{"type":"object","description":"Insight item for breakdowns and analytics","properties":{"name":{"type":"string","description":"The name of the item (model, provider, or task type)","example":"gpt-4"},"value":{"type":"number","description":"The value (cost in dollars or duration in milliseconds)","example":0.0024},"percentage":{"type":"number","description":"Percentage of the total","example":45.5}},"required":["name","percentage","value"]},"CriticalPathInfo":{"type":"object","description":"Critical path details including transaction sequence and totals","properties":{"transactionIds":{"type":"array","description":"Ordered list of transaction IDs forming the critical path (root to leaf)","example":["txn-001","txn-002","txn-005"],"items":{"type":"string"}},"totalDuration":{"type":"integer","format":"int64","description":"Total duration of the critical path in milliseconds","example":450},"totalCost":{"type":"number","description":"Total cost of the critical path","example":0.045}}},"CriticalPathOptimizationInfo":{"type":"object","description":"Optimization potential comparing critical path to next-longest path","properties":{"criticalPathDuration":{"type":"integer","format":"int64","description":"Duration of the critical path in milliseconds","example":450},"nextLongestDuration":{"type":"integer","format":"int64","description":"Duration of the next-longest path in milliseconds","example":180},"absoluteSavings":{"type":"integer","format":"int64","description":"Absolute time savings possible by optimizing critical path (ms)","example":270},"relativeSavingsPercent":{"type":"number","description":"Relative savings as percentage of critical path duration","example":60},"hasMultiplePaths":{"type":"boolean","description":"Whether there are multiple paths in the trace","example":true},"hasSavingsPotential":{"type":"boolean","description":"Whether there is potential for optimization (savings > 0)","example":true}}},"CriticalPathResponse":{"type":"object","description":"Critical path analysis response for a distributed trace","properties":{"traceId":{"type":"string","description":"The trace identifier","example":"trace-abc-123"},"criticalPath":{"$ref":"#/components/schemas/CriticalPathInfo","description":"Critical path information"},"bottleneckTransactionIds":{"type":"array","description":"List of transaction IDs that are bottlenecks (duration > 2.5x average)","example":["txn-002","txn-005"],"items":{"type":"string"}},"optimization":{"oneOf":[{"$ref":"#/components/schemas/CriticalPathOptimizationInfo"},{"type":"null"}]}}},"UserMetricData_Read":{"type":"object","description":"User metric data point","properties":{"requestCount":{"type":"integer","format":"int64","description":"Number of requests made by this user in this time bucket","example":45,"readOnly":true},"totalCost":{"type":"number","description":"Total cost incurred by this user in this time bucket","example":12.5,"readOnly":true},"totalTokens":{"type":"integer","format":"int64","description":"Total tokens used by this user in this time bucket","example":15000,"readOnly":true},"sessionCount":{"type":"integer","format":"int64","description":"Number of distinct sessions (unique trace IDs) by this user in this time bucket","example":8,"readOnly":true}},"required":["requestCount","sessionCount","totalCost","totalTokens"]},"UserMetricsGroup_Read":{"type":"object","description":"Metrics group for a specific user","properties":{"userEmail":{"type":"string","description":"User email (used as group identifier)","example":"user@example.com","readOnly":true},"metrics":{"$ref":"#/components/schemas/UserMetricData_Read","description":"Metrics for this user in this time bucket","readOnly":true}},"required":["metrics","userEmail"]},"UserMetricsOverTimeResponse_Read":{"type":"object","description":"User metrics grouped by time bucket with separate groups for each user","properties":{"startTimestamp":{"type":"integer","format":"int64","description":"Start timestamp of this time bucket in epoch milliseconds","example":1704067200000,"readOnly":true},"endTimestamp":{"type":"integer","format":"int64","description":"End timestamp of this time bucket in epoch milliseconds","example":1704153600000,"readOnly":true},"groups":{"type":"array","description":"List of user groups with their metrics for this time bucket","items":{"$ref":"#/components/schemas/UserMetricsGroup_Read"},"readOnly":true}},"required":["endTimestamp","groups","startTimestamp"]},"TokenMetric_Read":{"type":"object","description":"Token metric data point","properties":{"startTimestamp":{"type":"integer","format":"int64","description":"Start timestamp in epoch milliseconds","example":1704067200000,"readOnly":true},"endTimestamp":{"type":"integer","format":"int64","description":"End timestamp in epoch milliseconds","example":1704153600000,"readOnly":true},"metricType":{"type":"string","description":"Type of token metric being reported (INPUT_TOKENS, OUTPUT_TOKENS, or CACHE_READ_TOKENS)","example":"INPUT_TOKENS","readOnly":true},"metricResult":{"type":"integer","format":"int64","description":"Total token count for this metric type in this time bucket","example":15000,"readOnly":true}},"required":["endTimestamp","metricResult","metricType","startTimestamp"]},"TokenMetricsGroup_Read":{"type":"object","description":"Token metrics group for a specific token type","properties":{"groupName":{"type":"string","description":"Name of the token type group (INPUT_TOKENS, OUTPUT_TOKENS, or CACHE_READ_TOKENS)","example":"INPUT_TOKENS","readOnly":true},"metrics":{"type":"array","description":"List of metrics for this token type","items":{"$ref":"#/components/schemas/TokenMetric_Read"},"readOnly":true}},"required":["groupName","metrics"]},"TraceTokensOverTimeResponse_Read":{"type":"object","description":"Token metrics grouped by time bucket with separate groups for input, output, and cache read tokens","properties":{"startTimestamp":{"type":"integer","format":"int64","description":"Start timestamp of this time bucket in epoch milliseconds","example":1704067200000,"readOnly":true},"endTimestamp":{"type":"integer","format":"int64","description":"End timestamp of this time bucket in epoch milliseconds","example":1704153600000,"readOnly":true},"groups":{"type":"array","description":"List of token type groups (INPUT_TOKENS, OUTPUT_TOKENS, CACHE_READ_TOKENS) with their metrics","items":{"$ref":"#/components/schemas/TokenMetricsGroup_Read"},"readOnly":true}},"required":["endTimestamp","groups","startTimestamp"]},"TraceTypeMetric":{"type":"object","properties":{"startTimestamp":{"type":"integer","format":"int64","description":"Start timestamp in epoch milliseconds","example":1761057106116,"readOnly":true},"endTimestamp":{"type":"integer","format":"int64","description":"End timestamp in epoch milliseconds","example":1761143505116,"readOnly":true},"traceType":{"type":"string","description":"Trace type identifier","example":"authentication-flow","readOnly":true},"metricResult":{"type":"number","description":"Metric value (cost, duration, etc.)","example":123.45,"readOnly":true},"metricType":{"type":"string","description":"Type of metric being reported","example":"COST_BY_TRACE_TYPE_OVER_TIME","readOnly":true}},"required":["endTimestamp","metricResult","metricType","startTimestamp","traceType"]},"TraceTypeMetricGroup":{"type":"object","properties":{"groupName":{"type":"string","description":"Name of the trace type (used for grouping)","example":"authentication-flow","readOnly":true},"metrics":{"type":"array","description":"List of metrics for this trace type","items":{"$ref":"#/components/schemas/TraceTypeMetric"},"readOnly":true}},"required":["groupName","metrics"]},"TraceTypeMetricsOverTimeResponse":{"type":"object","properties":{"startTimestamp":{"type":"integer","format":"int64","description":"Start timestamp of this time bucket in epoch milliseconds","example":1761057106116,"readOnly":true},"endTimestamp":{"type":"integer","format":"int64","description":"End timestamp of this time bucket in epoch milliseconds","example":1761143505116,"readOnly":true},"groups":{"type":"array","description":"List of trace type groups with their metrics","items":{"$ref":"#/components/schemas/TraceTypeMetricGroup"},"readOnly":true}},"required":["endTimestamp","groups","startTimestamp"]},"TraceTypePerformanceMetrics":{"type":"object","properties":{"traceType":{"type":"string","description":"Trace type identifier (or 'unknown' for traces without a type)","example":"document_analysis","readOnly":true},"averageDuration":{"type":"number","description":"Average request duration in milliseconds for this trace type","example":1234.56,"readOnly":true},"p95Duration":{"type":"number","description":"95th percentile request duration in milliseconds for this trace type","example":2345.67,"readOnly":true},"p99Duration":{"type":"number","description":"99th percentile request duration in milliseconds for this trace type","example":3456.78,"readOnly":true}},"required":["averageDuration","p95Duration","p99Duration","traceType"]},"OrganizationMetricData_Read":{"type":"object","description":"Organization metric data point","properties":{"requestCount":{"type":"integer","format":"int64","description":"Number of requests in this time bucket","example":45,"readOnly":true},"totalCost":{"type":"number","description":"Total cost in this time bucket","example":12.5,"readOnly":true},"totalTokens":{"type":"integer","format":"int64","description":"Total tokens in this time bucket","example":15000,"readOnly":true},"sessionCount":{"type":"integer","format":"int64","description":"Number of distinct sessions (unique trace IDs)","example":8,"readOnly":true}},"required":["requestCount","sessionCount","totalCost","totalTokens"]},"OrganizationMetricsGroup_Read":{"type":"object","description":"Metrics group for a specific organization","properties":{"organizationId":{"type":"string","description":"Organization's unique identifier (hashid)","example":"jR2kmLs","readOnly":true},"organizationName":{"type":"string","description":"Organization name","example":"Engineering Team","readOnly":true},"metrics":{"$ref":"#/components/schemas/OrganizationMetricData_Read","description":"Metrics for this organization in this time bucket","readOnly":true}},"required":["metrics","organizationId","organizationName"]},"OrganizationMetricsOverTimeResponse_Read":{"type":"object","description":"Organization metrics grouped by time bucket with separate groups for each organization","properties":{"startTimestamp":{"type":"integer","format":"int64","description":"Start timestamp of this time bucket in epoch milliseconds","example":1704067200000,"readOnly":true},"endTimestamp":{"type":"integer","format":"int64","description":"End timestamp of this time bucket in epoch milliseconds","example":1704153600000,"readOnly":true},"groups":{"type":"array","description":"List of organization groups with their metrics for this time bucket","items":{"$ref":"#/components/schemas/OrganizationMetricsGroup_Read"},"readOnly":true}},"required":["endTimestamp","groups","startTimestamp"]},"ModelMetricData_Read":{"type":"object","description":"Model metric data point","properties":{"requestCount":{"type":"integer","format":"int64","description":"Number of requests for this model in this time bucket","example":120,"readOnly":true},"totalCost":{"type":"number","description":"Total cost for this model in this time bucket","example":45.75,"readOnly":true},"totalTokens":{"type":"integer","format":"int64","description":"Total tokens used by this model in this time bucket","example":50000,"readOnly":true}},"required":["requestCount","totalCost","totalTokens"]},"ModelMetricsGroup_Read":{"type":"object","description":"Metrics group for a specific AI model","properties":{"modelName":{"type":"string","description":"Model name (used as group identifier)","example":"claude-sonnet-4-20250514","readOnly":true},"metrics":{"$ref":"#/components/schemas/ModelMetricData_Read","description":"Metrics for this model in this time bucket","readOnly":true}},"required":["metrics","modelName"]},"ModelMetricsOverTimeResponse_Read":{"type":"object","description":"Model metrics grouped by time bucket with separate groups for each model","properties":{"startTimestamp":{"type":"integer","format":"int64","description":"Start timestamp of this time bucket in epoch milliseconds","example":1704067200000,"readOnly":true},"endTimestamp":{"type":"integer","format":"int64","description":"End timestamp of this time bucket in epoch milliseconds","example":1704153600000,"readOnly":true},"groups":{"type":"array","description":"List of model groups with their metrics for this time bucket","items":{"$ref":"#/components/schemas/ModelMetricsGroup_Read"},"readOnly":true}},"required":["endTimestamp","groups","startTimestamp"]},"ModelTokenBreakdown":{"type":"object","description":"Token usage breakdown for a single AI model","properties":{"model":{"type":"string","description":"Name of the AI model","example":"claude-sonnet-4-20250514","readOnly":true},"inputTokens":{"type":"integer","format":"int64","description":"Total input tokens sent to this model in the period","example":700000,"readOnly":true},"outputTokens":{"type":"integer","format":"int64","description":"Total output tokens received from this model in the period","example":350000,"readOnly":true},"cacheReadTokens":{"type":"integer","format":"int64","description":"Total cache read tokens for this model in the period","example":120000,"readOnly":true},"cacheWriteTokens":{"type":"integer","format":"int64","description":"Total cache write tokens for this model in the period","example":50000,"readOnly":true},"inputCost":{"type":"number","description":"Cost of input tokens for this model in the period","example":0.021,"readOnly":true},"outputCost":{"type":"number","description":"Cost of output tokens for this model in the period","example":0.035,"readOnly":true},"cacheReadCost":{"type":"number","description":"Cost of cache read tokens for this model in the period","example":0.0012,"readOnly":true},"cacheWriteCost":{"type":"number","description":"Cost of cache write tokens for this model in the period","example":0.005,"readOnly":true},"totalCost":{"type":"number","description":"Total cost for this model in the period (input + output + cache read + cache write)","example":0.0622,"readOnly":true}},"required":["cacheReadCost","cacheReadTokens","cacheWriteCost","cacheWriteTokens","inputCost","inputTokens","model","outputCost","outputTokens","totalCost"]},"OperationTypeCostBreakdown":{"type":"object","properties":{"operationType":{"type":"string","description":"Operation type (e.g., CHAT, GENERATE, AUDIO, VIDEO, IMAGE)","enum":["CHAT","GENERATE","EMBED","CLASSIFY","SUMMARIZE","TRANSLATE","OTHER","TOOL_CALL","RERANK","SEARCH","MODERATION","VISION","TRANSFORM","GUARDRAIL","AUDIO","VIDEO","IMAGE"],"example":"CHAT","readOnly":true},"totalCost":{"type":"number","description":"Total cost for this operation type in the period","example":1234.56,"readOnly":true},"percentage":{"type":"number","description":"Percentage of total trace cost represented by this operation type","example":45.67,"readOnly":true}},"required":["operationType","percentage","totalCost"]},"TopCostInsights":{"type":"object","properties":{"mostExpensive":{"oneOf":[{"$ref":"#/components/schemas/TraceTypeInsight"},{"type":"null"}]},"biggestIncrease":{"oneOf":[{"$ref":"#/components/schemas/TraceTypeInsight"},{"type":"null"}]},"mostOutliers":{"oneOf":[{"$ref":"#/components/schemas/TraceTypeInsight"},{"type":"null"}]},"costEfficient":{"oneOf":[{"$ref":"#/components/schemas/TraceTypeInsight"},{"type":"null"}]}}},"TopEfficiencyInsights":{"type":"object","properties":{"mostEfficient":{"oneOf":[{"$ref":"#/components/schemas/TraceTypeInsight"},{"type":"null"}]},"leastEfficient":{"oneOf":[{"$ref":"#/components/schemas/TraceTypeInsight"},{"type":"null"}]},"highestVariability":{"oneOf":[{"$ref":"#/components/schemas/TraceTypeInsight"},{"type":"null"}]},"mostOutliers":{"oneOf":[{"$ref":"#/components/schemas/TraceTypeInsight"},{"type":"null"}]}}},"TopPerformanceInsights":{"type":"object","properties":{"slowest":{"oneOf":[{"$ref":"#/components/schemas/TraceTypeInsight"},{"type":"null"}]},"mostTransactionHeavy":{"oneOf":[{"$ref":"#/components/schemas/TraceTypeInsight"},{"type":"null"}]},"mostInefficient":{"oneOf":[{"$ref":"#/components/schemas/TraceTypeInsight"},{"type":"null"}]},"biggestDegradation":{"oneOf":[{"$ref":"#/components/schemas/TraceTypeInsight"},{"type":"null"}]}}},"TraceCostMetricsResponse":{"type":"object","properties":{"startTimestamp":{"type":"integer","format":"int64","description":"Start timestamp in epoch milliseconds","example":1761057106116,"readOnly":true},"endTimestamp":{"type":"integer","format":"int64","description":"End timestamp in epoch milliseconds","example":1761143505116,"readOnly":true},"totalCost":{"type":"number","description":"Total cost across all traces in the period","example":1234.56,"readOnly":true},"requestCount":{"type":"integer","format":"int64","description":"Total number of AI completion requests in the period","example":1500,"readOnly":true},"sessionCount":{"type":"integer","format":"int64","description":"Number of distinct sessions (unique trace IDs) in the period","example":50,"readOnly":true},"totalTokens":{"type":"integer","format":"int64","description":"Total tokens (input + output + cache read) across all requests in the period","example":2500000,"readOnly":true},"inputTokens":{"type":"integer","format":"int64","description":"Total input tokens sent to the API in the period","example":1500000,"readOnly":true},"outputTokens":{"type":"integer","format":"int64","description":"Total output tokens received from the API in the period","example":1000000,"readOnly":true},"cachedTokens":{"type":"integer","format":"int64","description":"Total cached tokens (tokens served from prompt cache + cache creation tokens) in the period","example":500000,"readOnly":true},"p95Cost":{"type":"number","description":"95th percentile cost (real calculation)","example":0.7542,"readOnly":true},"averageCost":{"type":"number","description":"Average cost per trace","example":0.3456,"readOnly":true},"trendCost":{"type":["number","null"],"description":"Cost trend percentage compared to previous equivalent period (positive = increase, negative = decrease). Null if no previous data exists.","example":18.5,"readOnly":true},"previousPeriodCost":{"type":["number","null"],"description":"Total cost in the previous equivalent period. Null if no previous data exists.","example":1045.23,"readOnly":true},"costChange":{"type":["number","null"],"description":"Absolute cost change from previous to current period (current - previous). Null if no previous data exists.","example":189.33,"readOnly":true},"averageDuration":{"type":"number","description":"Average request duration in milliseconds","example":1234.56,"readOnly":true},"p95Duration":{"type":"number","description":"95th percentile request duration in milliseconds","example":2345.67,"readOnly":true},"p99Duration":{"type":"number","description":"99th percentile request duration in milliseconds","example":3456.78,"readOnly":true},"trendDuration":{"type":["number","null"],"description":"Duration trend percentage compared to previous equivalent period (positive = increase, negative = decrease). Null if no previous data exists.","example":12.3,"readOnly":true},"previousPeriodDuration":{"type":["number","null"],"description":"Average duration in the previous equivalent period. Null if no previous data exists.","example":1523.45,"readOnly":true},"durationChange":{"type":["number","null"],"description":"Absolute duration change from previous to current period (current - previous). Null if no previous data exists.","example":-340.89,"readOnly":true},"averageTransactions":{"type":"number","description":"Average number of transactions per trace","example":3.45,"readOnly":true},"p95Transactions":{"type":"number","description":"95th percentile of transactions per trace","example":5,"readOnly":true},"p99Transactions":{"type":"number","description":"99th percentile of transactions per trace","example":7,"readOnly":true},"trendTransactions":{"type":["number","null"],"description":"Transaction count trend percentage compared to previous equivalent period (positive = increase, negative = decrease). Null if no previous data exists.","example":15.2,"readOnly":true},"previousPeriodTransactions":{"type":["number","null"],"description":"Average transactions per trace in the previous equivalent period. Null if no previous data exists.","example":2.98,"readOnly":true},"transactionsChange":{"type":["number","null"],"description":"Absolute transaction count change from previous to current period (current - previous). Null if no previous data exists.","example":0.47,"readOnly":true},"availableTraceTypes":{"type":"array","description":"Available trace types for filtering. Includes 'unknown' if metrics without traceType exist.","example":["document_analysis","authentication_flow","unknown"],"items":{"type":"string"},"readOnly":true},"availableOperationTypes":{"type":"array","description":"Available operation types for filtering. Lists all operation types that have cost data in the current period.","example":["CHAT","GENERATE","AUDIO","VIDEO","IMAGE"],"items":{"type":"string"},"readOnly":true},"costByOperationType":{"type":["array","null"],"description":"Cost breakdown by operation type. Shows total cost and percentage for each operation type within the filtered traces. Note: Percentages may sum to less than 100% when legacy metrics without an explicit operation type exist, as these unclassified metrics are excluded from the breakdown.","items":{"$ref":"#/components/schemas/OperationTypeCostBreakdown"},"readOnly":true},"topCostInsights":{"oneOf":[{"$ref":"#/components/schemas/TopCostInsights"},{"type":"null"}]},"topPerformanceInsights":{"oneOf":[{"$ref":"#/components/schemas/TopPerformanceInsights"},{"type":"null"}]},"topEfficiencyInsights":{"oneOf":[{"$ref":"#/components/schemas/TopEfficiencyInsights"},{"type":"null"}]},"modelBreakdown":{"type":"array","description":"Per-model token usage breakdown. Enables frontend to calculate API-equivalent value using live model rates.","items":{"$ref":"#/components/schemas/ModelTokenBreakdown"},"readOnly":true},"previousPeriodRequestCount":{"type":["integer","null"],"format":"int64","description":"Total number of AI completion requests in the previous equivalent period. Null if no previous data exists.","example":1200,"readOnly":true},"previousPeriodTokens":{"type":["integer","null"],"format":"int64","description":"Total tokens in the previous equivalent period. Null if no previous data exists.","example":2000000,"readOnly":true},"requestCountChange":{"type":["number","null"],"description":"Request count trend percentage compared to previous equivalent period (positive = increase, negative = decrease). Null if no previous data exists.","example":25,"readOnly":true},"tokensChange":{"type":["number","null"],"description":"Token count trend percentage compared to previous equivalent period (positive = increase, negative = decrease). Null if no previous data exists.","example":25,"readOnly":true}},"required":["availableOperationTypes","availableTraceTypes","averageCost","averageDuration","averageTransactions","cachedTokens","endTimestamp","inputTokens","outputTokens","p95Cost","p95Duration","p95Transactions","p99Duration","p99Transactions","requestCount","sessionCount","startTimestamp","totalCost","totalTokens"]},"TraceTypeInsight":{"type":"object","properties":{"traceType":{"type":"string","description":"Trace type identifier (or 'unknown' for traces without a type)","example":"document_analysis","readOnly":true},"value":{"type":"number","description":"The numeric value for this insight (cost, duration, count, ratio, etc.)","example":1234.56,"readOnly":true},"displayLabel":{"type":["string","null"],"description":"Human-readable label for display (e.g., '+45.2%', '234 outliers', '2.5x ratio')","example":"+45.2%","readOnly":true}},"required":["traceType","value"]},"ModelTokenBreakdown_Read":{"type":"object","description":"Token usage breakdown for a single AI model","properties":{"model":{"type":"string","description":"Name of the AI model","example":"claude-sonnet-4-20250514","readOnly":true},"inputTokens":{"type":"integer","format":"int64","description":"Total input tokens sent to this model in the period","example":700000,"readOnly":true},"outputTokens":{"type":"integer","format":"int64","description":"Total output tokens received from this model in the period","example":350000,"readOnly":true},"cacheReadTokens":{"type":"integer","format":"int64","description":"Total cache read tokens for this model in the period","example":120000,"readOnly":true},"cacheWriteTokens":{"type":"integer","format":"int64","description":"Total cache write tokens for this model in the period","example":50000,"readOnly":true},"inputCost":{"type":"number","description":"Cost of input tokens for this model in the period","example":0.021,"readOnly":true},"outputCost":{"type":"number","description":"Cost of output tokens for this model in the period","example":0.035,"readOnly":true},"cacheReadCost":{"type":"number","description":"Cost of cache read tokens for this model in the period","example":0.0012,"readOnly":true},"cacheWriteCost":{"type":"number","description":"Cost of cache write tokens for this model in the period","example":0.005,"readOnly":true},"totalCost":{"type":"number","description":"Total cost for this model in the period (input + output + cache read + cache write)","example":0.0622,"readOnly":true}},"required":["cacheReadCost","cacheReadTokens","cacheWriteCost","cacheWriteTokens","inputCost","inputTokens","model","outputCost","outputTokens","totalCost"]},"TraceMetricsByUserResponse_Read":{"type":"object","description":"Usage metrics grouped by user email","properties":{"users":{"type":"array","description":"List of user usage metrics","items":{"$ref":"#/components/schemas/UserUsageMetric_Read"},"readOnly":true}},"required":["users"]},"UserUsageMetric_Read":{"type":"object","description":"Usage metrics for a single user","properties":{"userEmail":{"type":"string","description":"User's email address","example":"user@example.com","readOnly":true},"requestCount":{"type":"integer","format":"int64","description":"Total number of API requests made by this user","example":150,"readOnly":true},"totalCost":{"type":"number","description":"Total cost incurred by this user","example":12.5,"readOnly":true},"totalTokens":{"type":"integer","format":"int64","description":"Total tokens used by this user (input + output + cache read)","example":50000,"readOnly":true},"inputTokens":{"type":"integer","format":"int64","description":"Total input tokens used by this user","example":32000,"readOnly":true},"outputTokens":{"type":"integer","format":"int64","description":"Total output tokens used by this user","example":18000,"readOnly":true},"cacheReadTokens":{"type":"integer","format":"int64","description":"Total cache read tokens used by this user","example":8000,"readOnly":true},"cacheWriteTokens":{"type":"integer","format":"int64","description":"Total cache write tokens used by this user","example":3000,"readOnly":true},"inputCost":{"type":"number","description":"Total cost of input tokens for this user","example":7,"readOnly":true},"outputCost":{"type":"number","description":"Total cost of output tokens for this user","example":4.5,"readOnly":true},"cacheReadCost":{"type":"number","description":"Total cost of cache read tokens for this user","example":0.8,"readOnly":true},"cacheWriteCost":{"type":"number","description":"Total cost of cache write tokens for this user","example":0.2,"readOnly":true},"modelBreakdown":{"type":"array","description":"Per-model token usage breakdown. Enables frontend to calculate per-user API-equivalent value using live model rates.","items":{"$ref":"#/components/schemas/ModelTokenBreakdown_Read"},"readOnly":true}},"required":["cacheReadCost","cacheReadTokens","cacheWriteCost","cacheWriteTokens","inputCost","inputTokens","outputCost","outputTokens","requestCount","totalCost","totalTokens","userEmail"]},"OrganizationUsageMetric_Read":{"type":"object","description":"Usage metrics for a single organization","properties":{"organizationId":{"type":"string","description":"Organization's unique identifier (hashid)","example":"jR2kmLs","readOnly":true},"organizationName":{"type":"string","description":"Organization name","example":"Engineering Team","readOnly":true},"requestCount":{"type":"integer","format":"int64","description":"Total number of API requests","example":1500,"readOnly":true},"totalCost":{"type":"number","description":"Total cost incurred","example":125.5,"readOnly":true},"totalTokens":{"type":"integer","format":"int64","description":"Total tokens used (input + output + cached)","example":500000,"readOnly":true},"sessionCount":{"type":"integer","format":"int64","description":"Number of distinct sessions (unique trace IDs)","example":50,"readOnly":true}},"required":["organizationId","organizationName","requestCount","sessionCount","totalCost","totalTokens"]},"TraceMetricsByOrganizationResponse_Read":{"type":"object","description":"Usage metrics grouped by consuming organization","properties":{"organizations":{"type":"array","description":"List of organization usage metrics","items":{"$ref":"#/components/schemas/OrganizationUsageMetric_Read"},"readOnly":true}},"required":["organizations"]},"ModelUsageMetric_Read":{"type":"object","description":"Usage metrics for a single model","properties":{"modelName":{"type":"string","description":"Name of the AI model","example":"claude-sonnet-4-20250514","readOnly":true},"requestCount":{"type":"integer","format":"int64","description":"Total number of API requests using this model","example":100,"readOnly":true},"totalCost":{"type":"number","description":"Total cost incurred by this model","example":8.5,"readOnly":true},"averageCost":{"type":"number","description":"Average cost per request for this model","example":0.085,"readOnly":true},"percentageOfTotal":{"type":"number","description":"Percentage of total cost attributable to this model","example":68,"readOnly":true}},"required":["averageCost","modelName","percentageOfTotal","requestCount","totalCost"]},"TraceMetricsByModelResponse_Read":{"type":"object","description":"Usage metrics grouped by model","properties":{"models":{"type":"array","description":"List of model usage metrics","items":{"$ref":"#/components/schemas/ModelUsageMetric_Read"},"readOnly":true}},"required":["models"]},"TraceTypeEfficiencyMetrics":{"type":"object","properties":{"traceType":{"type":"string","description":"Trace type identifier (or 'unknown' for traces without a type)","example":"document_analysis","readOnly":true},"averageTransactions":{"type":"number","description":"Average transactions per trace for this trace type","example":3.45,"readOnly":true},"p95Transactions":{"type":"number","description":"95th percentile transactions per trace for this trace type","example":5,"readOnly":true},"p99Transactions":{"type":"number","description":"99th percentile transactions per trace for this trace type","example":7,"readOnly":true},"trendTransactions":{"type":["number","null"],"description":"Transaction count trend percentage compared to previous equivalent period (positive = increase, negative = decrease). Null if no previous data exists.","example":15.2,"readOnly":true},"previousPeriodTransactions":{"type":["number","null"],"description":"Average transactions per trace in the previous equivalent period. Null if no previous data exists.","example":2.98,"readOnly":true},"transactionsChange":{"type":["number","null"],"description":"Absolute transaction count change from previous to current period (current - previous). Null if no previous data exists.","example":0.47,"readOnly":true}},"required":["averageTransactions","p95Transactions","p99Transactions","traceType"]},"TraceTypeCostMetrics":{"type":"object","properties":{"traceType":{"type":"string","description":"Trace type identifier (or 'unknown' for traces without a type)","example":"document_analysis","readOnly":true},"totalCost":{"type":"number","description":"Total cost across all traces of this type in the period","example":1234.56,"readOnly":true},"averageCost":{"type":"number","description":"Average cost per trace of this type","example":0.3456,"readOnly":true},"p95Cost":{"type":"number","description":"95th percentile cost for this trace type","example":0.7542,"readOnly":true},"p99Cost":{"type":"number","description":"99th percentile cost for this trace type","example":0.8956,"readOnly":true},"trendCost":{"type":["number","null"],"description":"Cost trend percentage compared to previous equivalent period (positive = increase, negative = decrease). Null if no previous data exists.","example":18.5,"readOnly":true},"previousPeriodCost":{"type":["number","null"],"description":"Total cost for this trace type in the previous equivalent period. Null if no previous data exists.","example":1045.23,"readOnly":true},"costChange":{"type":["number","null"],"description":"Absolute cost change from previous to current period for this trace type (current - previous). Null if no previous data exists.","example":189.33,"readOnly":true}},"required":["averageCost","p95Cost","p99Cost","totalCost","traceType"]},"CircularPatternPagedModel":{"type":"object","description":"Paginated circular pattern analysis response","properties":{"_embedded":{"type":"object","properties":{"circularPatternList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelCircularPattern"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata"},"patternsDetected":{"type":"integer","format":"int64","description":"Total number of circular patterns detected","example":847},"totalWasteDuration":{"type":"integer","format":"int64","description":"Total wasted duration in milliseconds (across all patterns)","example":8640000},"totalWasteCost":{"type":"number","description":"Total wasted cost (across all patterns)","example":127.5},"severities":{"type":"array","description":"Breakdown of pattern counts by severity level","items":{"$ref":"#/components/schemas/SeverityCount"}},"availableTraceTypes":{"type":"array","description":"List of available trace types for filtering","example":["workflow","chat","unknown"],"items":{"type":"string"}}},"required":["availableTraceTypes","patternsDetected","severities","totalWasteCost","totalWasteDuration"]},"EntityModelCircularPattern":{"type":"object","properties":{"pattern":{"type":"string","description":"Agent sequence pattern (also serves as unique identifier)","example":"Agent A → Agent B → Agent A"},"occurrences":{"type":"integer","format":"int64","description":"Number of times this pattern occurred","example":234},"wasteDuration":{"type":"integer","format":"int64","description":"Total wasted duration in milliseconds","example":2700000},"wasteCost":{"type":"number","description":"Total wasted cost","example":23.4},"severity":{"type":"string","description":"Severity level: minor (1-2 hop), major (3-hop), critical (4+ hop)","example":"minor"},"hopCount":{"type":"integer","format":"int32","description":"Number of hops in the circular pattern","example":2},"_links":{"$ref":"#/components/schemas/Links"}},"required":["hopCount","occurrences","pattern","severity","wasteCost","wasteDuration"]},"SeverityCount":{"type":"object","description":"Count of patterns by severity level","properties":{"level":{"type":"string","description":"Severity level: minor, major, or critical","example":"minor"},"count":{"type":"integer","format":"int64","description":"Number of patterns with this severity","example":668}},"required":["count","level"]},"AnomalyTableRow":{"type":"object","description":"Anomalous trace table row showing a trace that exceeded a metric threshold","properties":{"id":{"type":"string","description":"Unique identifier (traceId). Since one trace can have multiple anomalous metrics, use traceId_{metricType} for uniqueness if needed.","example":"trace_abc123def456"},"startTime":{"type":"string","description":"Trace start time in ISO 8601 format (sortable)","example":"2025-01-15T14:23:45Z"},"traceType":{"type":["string","null"],"description":"Trace type (nullable, sortable)","example":"chat_completion"},"traceName":{"type":["string","null"],"description":"Trace name (nullable, sortable)","example":"Customer Support Chat"},"metricType":{"type":"string","description":"Metric type that is anomalous (sortable)","enum":["TRANSACTION_COUNT","TOTAL_COST","TRACE_DURATION"],"example":"TOTAL_COST"},"actualValue":{"type":"number","description":"Actual value of the metric (sortable)","example":3.45},"thresholdValue":{"type":"number","description":"Threshold value for the selected percentile (sortable)","example":2.45},"percentile":{"type":"string","description":"Percentile filter used (matches the request percentile parameter)","enum":["P95","P99","P75"],"example":"P95"}}},"PercentileAnomalyCountsResponse":{"type":"object","description":"Anomaly counts per percentile for a specific metric type","properties":{"p75":{"type":"integer","format":"int64","description":"Number of anomalous traces at P75 threshold (moderate anomalies)","example":40},"p95":{"type":"integer","format":"int64","description":"Number of anomalous traces at P95 threshold (high anomalies)","example":20},"p99":{"type":"integer","format":"int64","description":"Number of anomalous traces at P99 threshold (critical anomalies)","example":10}}},"AgentInteraction":{"type":"object","description":"Agent-to-agent interaction metrics","properties":{"fromAgent":{"type":"string","description":"The source agent name","example":"DataProcessor"},"toAgent":{"type":"string","description":"The destination agent name","example":"ValidationAgent"},"callCount":{"type":"integer","format":"int64","description":"Number of calls from fromAgent to toAgent","example":342},"totalCost":{"type":"number","description":"Sum of costs for this agent pair","example":45.67},"avgDuration":{"type":"number","description":"Average duration for this agent pair in milliseconds","example":133.5},"callCountIntensity":{"type":["integer","null"],"format":"int32","description":"Intensity level for call count (1-5, null if not calculated)","example":4},"totalCostIntensity":{"type":["integer","null"],"format":"int32","description":"Intensity level for total cost (1-5, null if not calculated)","example":3},"avgDurationIntensity":{"type":["integer","null"],"format":"int32","description":"Intensity level for average duration (1-5, null if not calculated)","example":2}},"required":["avgDuration","callCount","fromAgent","toAgent","totalCost"]},"AgentInteractionTablePagedModel":{"type":"object","description":"Paginated list of agent-to-agent interactions","properties":{"_embedded":{"type":"object","properties":{"agentInteractionList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelAgentInteraction"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata"}}},"EntityModelAgentInteraction":{"type":"object","properties":{"fromAgent":{"type":"string","description":"The source agent name","example":"DataProcessor"},"toAgent":{"type":"string","description":"The destination agent name","example":"ValidationAgent"},"callCount":{"type":"integer","format":"int64","description":"Number of calls from fromAgent to toAgent","example":342},"totalCost":{"type":"number","description":"Sum of costs for this agent pair","example":45.67},"avgDuration":{"type":"number","description":"Average duration for this agent pair in milliseconds","example":133.5},"callCountIntensity":{"type":["integer","null"],"format":"int32","description":"Intensity level for call count (1-5, null if not calculated)","example":4},"totalCostIntensity":{"type":["integer","null"],"format":"int32","description":"Intensity level for total cost (1-5, null if not calculated)","example":3},"avgDurationIntensity":{"type":["integer","null"],"format":"int32","description":"Intensity level for average duration (1-5, null if not calculated)","example":2},"_links":{"$ref":"#/components/schemas/Links"}},"required":["avgDuration","callCount","fromAgent","toAgent","totalCost"]},"AgentInteractionMatrixPagedModel":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"agentSummaryList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelAgentSummary"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata"},"interactions":{"type":"array","description":"List of agent-to-agent interactions for agents in current page","items":{"$ref":"#/components/schemas/AgentInteraction"}},"totalAgents":{"type":"integer","format":"int32","description":"Count of distinct agents (across all data)","example":12},"totalInteractions":{"type":"integer","format":"int64","description":"Sum of all interactions (across all data)","example":1847},"totalCost":{"type":"number","description":"Sum of all costs (across all data)","example":234.56},"avgInteractionsPerAgent":{"type":"number","format":"double","description":"Average interactions per agent (totalInteractions / totalAgents)","example":153.9},"availableTraceTypes":{"type":"array","description":"List of available trace types for filtering","example":["chat_completion","agent_workflow","unknown"],"items":{"type":"string"}}},"required":["availableTraceTypes","avgInteractionsPerAgent","interactions","totalAgents","totalCost","totalInteractions"]},"EntityModelAgentSummary":{"type":"object","properties":{"agent":{"type":"string","description":"The agent name","example":"DataProcessor"},"callCount":{"type":"integer","format":"int64","description":"Total call count for this agent (outgoing + incoming)","example":542},"totalCost":{"type":"number","description":"Total cost for this agent","example":67.89},"avgDuration":{"type":"number","description":"Average duration for this agent in milliseconds","example":125.5},"_links":{"$ref":"#/components/schemas/Links"}},"required":["agent","avgDuration","callCount","totalCost"]},"AggregatedModelCostTimeAIMetricResource":{"type":"object","description":"The aggregated model AI metric","properties":{"startTimestamp":{"type":"integer","format":"int64","description":"The end of the metric range"},"model":{"type":"string","description":"The model name","example":"claude-2-70b"},"metricResult":{"type":"number","description":"The metric value"},"timeResult":{"type":"number","format":"double","description":"The metric value"},"metricType":{"type":"string","description":"The metric type"},"_links":{"$ref":"#/components/schemas/Links"}}},"AggregatedProviderAIMetricGroupResource":{"type":"object","properties":{"groupName":{"type":"string","description":"The name of the grouping dimension (e.g., provider name, time period)","example":"open_ai","readOnly":true},"metrics":{"type":"array","description":"The list of aggregated provider AI metrics within this group","items":{"$ref":"#/components/schemas/AggregatedProviderAIMetricResource"},"readOnly":true}},"required":["groupName","metrics"]},"AggregatedProviderAIMetricResource":{"type":"object","properties":{"startTimestamp":{"type":"integer","format":"int64","description":"The start timestamp of the metric aggregation period in milliseconds since epoch","example":1704067200000,"readOnly":true},"endTimestamp":{"type":"integer","format":"int64","description":"The end timestamp of the metric aggregation period in milliseconds since epoch","example":1704153600000,"readOnly":true},"provider":{"type":"string","description":"The AI provider name (e.g., OpenAI, Anthropic, Google)","example":"open_ai","readOnly":true},"metricResult":{"type":"number","description":"The aggregated metric value for the specified metric type","example":1234.56,"readOnly":true},"metricType":{"type":"string","description":"The type of metric being aggregated (e.g., TOTAL_COST, TOTAL_TOKENS, AVERAGE_COST)","example":"TOTAL_COST_BY_PROVIDER","readOnly":true},"modelMetrics":{"type":"array","description":"The list of aggregated model metrics for this provider","items":{"$ref":"#/components/schemas/AggregatedModelCostTimeAIMetricResource"},"readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["endTimestamp","metricResult","metricType","modelMetrics","provider","startTimestamp"]},"AggregatedProviderAIMetricTimestampGroupResource":{"type":"object","properties":{"startTimestamp":{"type":"integer","format":"int64","description":"The start timestamp of the metric aggregation period in milliseconds since epoch","example":1704067200000,"readOnly":true},"endTimestamp":{"type":"integer","format":"int64","description":"The end timestamp of the metric aggregation period in milliseconds since epoch","example":1704153600000,"readOnly":true},"groups":{"type":"array","description":"The list of provider metric groups within this time period","items":{"$ref":"#/components/schemas/AggregatedProviderAIMetricGroupResource"},"readOnly":true}},"required":["endTimestamp","groups","startTimestamp"]},"AggregatedModelAIMetricGroupResource":{"type":"object","properties":{"groupName":{"type":"string","description":"The name of the grouping dimension (e.g., model name, time period)","example":"gpt-4-0613","readOnly":true},"metrics":{"type":"array","description":"The list of aggregated model AI metrics within this group","items":{"$ref":"#/components/schemas/AggregatedModelAIMetricResource"},"readOnly":true}},"required":["groupName","metrics"]},"AggregatedModelAIMetricResource":{"type":"object","description":"Aggregated AI metrics by model","properties":{"startTimestamp":{"type":"string","description":"The start timestamp of the metric aggregation period (ISO 8601 format)","example":"2024-01-01T00:00:00Z","readOnly":true},"endTimestamp":{"type":"string","description":"The end timestamp of the metric aggregation period (ISO 8601 format)","example":"2024-01-02T00:00:00Z","readOnly":true},"model":{"type":"string","description":"The AI model name (e.g., gpt-4, claude-3-opus)","example":"gpt-4-0613","readOnly":true},"metricResult":{"type":"number","description":"The aggregated metric value for the specified metric type","example":1234.56,"readOnly":true},"metricType":{"type":"string","description":"The type of metric being aggregated (e.g., TOTAL_COST, TOTAL_TOKENS, AVERAGE_COST)","example":"TOTAL_COST_BY_MODEL","readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["endTimestamp","metricResult","metricType","model","startTimestamp"]},"AggregatedModelAIMetricTimestampGroupResource":{"type":"object","properties":{"startTimestamp":{"type":"string","description":"The start timestamp of the metric aggregation period (ISO 8601 format)","example":"2024-01-01T00:00:00Z","readOnly":true},"endTimestamp":{"type":"string","description":"The end timestamp of the metric aggregation period (ISO 8601 format)","example":"2024-01-02T00:00:00Z","readOnly":true},"groups":{"type":"array","description":"The list of model metric groups within this time period","items":{"$ref":"#/components/schemas/AggregatedModelAIMetricGroupResource"},"readOnly":true}},"required":["endTimestamp","groups","startTimestamp"]},"AggregatedAIMetric":{"type":"object","properties":{"startTimestamp":{"type":"string","format":"date-time"},"endTimestamp":{"type":"string","format":"date-time"},"value":{"type":"string"},"expandedValue":{"type":["string","null"]},"metricResult":{"type":"number"},"metricType":{"type":"string"}}},"AggregatedProductAIMetricGroupResource":{"type":"object","properties":{"groupName":{"type":"string","description":"The name of the grouping dimension (e.g., product name, time period)","example":"Premium API Access","readOnly":true},"metrics":{"type":"array","description":"The list of aggregated product AI metrics within this group","items":{"$ref":"#/components/schemas/AggregatedProductAIMetricResource"},"readOnly":true}},"required":["groupName","metrics"]},"AggregatedProductAIMetricResource":{"type":"object","properties":{"startTimestamp":{"type":"integer","format":"int64","description":"The start timestamp of the metric aggregation period in milliseconds since epoch","example":1704067200000,"readOnly":true},"endTimestamp":{"type":"integer","format":"int64","description":"The end timestamp of the metric aggregation period in milliseconds since epoch","example":1704153600000,"readOnly":true},"productId":{"type":"string","description":"The unique identifier of the product","example":"af75417c71d24e708f506596ce5ab675","readOnly":true},"productName":{"type":"string","description":"The name of the product","example":"Premium API Access","readOnly":true},"metricResult":{"type":"number","description":"The aggregated metric value for the specified metric type","example":1234.56,"readOnly":true},"metricType":{"type":"string","description":"The type of metric being aggregated (e.g., TOTAL_COST, TOTAL_TOKENS, AVERAGE_COST)","example":"TOTAL_COST_BY_PRODUCT","readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["endTimestamp","metricResult","metricType","productId","productName","startTimestamp"]},"AggregatedProductAIMetricTimestampGroupResource":{"type":"object","properties":{"startTimestamp":{"type":"integer","format":"int64","description":"The start timestamp of the metric aggregation period in milliseconds since epoch","example":1704067200000,"readOnly":true},"endTimestamp":{"type":"integer","format":"int64","description":"The end timestamp of the metric aggregation period in milliseconds since epoch","example":1704153600000,"readOnly":true},"groups":{"type":"array","description":"The list of product metric groups within this time period","items":{"$ref":"#/components/schemas/AggregatedProductAIMetricGroupResource"},"readOnly":true}},"required":["endTimestamp","groups","startTimestamp"]},"AggregatedOrganizationAIMetricGroupResource":{"type":"object","properties":{"groupName":{"type":"string","description":"The name of the grouping dimension (e.g., organization name, time period)","example":"Weyland-Yutani Corporation","readOnly":true},"metrics":{"type":"array","description":"The list of aggregated organization AI metrics within this group","items":{"$ref":"#/components/schemas/AggregatedOrganizationAIMetricResource"},"readOnly":true}},"required":["groupName","metrics"]},"AggregatedOrganizationAIMetricResource":{"type":"object","properties":{"startTimestamp":{"type":"integer","format":"int64","description":"The start timestamp of the metric aggregation period in milliseconds since epoch","example":1704067200000,"readOnly":true},"endTimestamp":{"type":"integer","format":"int64","description":"The end timestamp of the metric aggregation period in milliseconds since epoch","example":1704153600000,"readOnly":true},"organizationId":{"type":"string","description":"The unique identifier of the organization","example":"6PV0xe","readOnly":true},"organizationName":{"type":"string","description":"The name of the organization","example":"Weyland-Yutani Corporation","readOnly":true},"metricResult":{"type":"number","description":"The aggregated metric value for the specified metric type","example":1234.56,"readOnly":true},"metricType":{"type":"string","description":"The type of metric being aggregated (e.g., TOTAL_COST, TOTAL_TOKENS, AVERAGE_COST)","example":"TOTAL_COST_BY_ORGANIZATION","readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["endTimestamp","metricResult","metricType","organizationId","organizationName","startTimestamp"]},"AggregatedOrganizationAIMetricTimestampGroupResource":{"type":"object","properties":{"startTimestamp":{"type":"integer","format":"int64","description":"The start timestamp of the metric aggregation period in milliseconds since epoch","example":1704067200000,"readOnly":true},"endTimestamp":{"type":"integer","format":"int64","description":"The end timestamp of the metric aggregation period in milliseconds since epoch","example":1704153600000,"readOnly":true},"groups":{"type":"array","description":"The list of organization metric groups within this time period","items":{"$ref":"#/components/schemas/AggregatedOrganizationAIMetricGroupResource"},"readOnly":true}},"required":["endTimestamp","groups","startTimestamp"]},"AggregatedAgentAIMetricGroupResource":{"type":"object","properties":{"groupName":{"type":"string","description":"The name of the grouping dimension (e.g., agent name, time period)","example":"agent-1234","readOnly":true},"metrics":{"type":"array","description":"The list of aggregated agent AI metrics within this group","items":{"$ref":"#/components/schemas/AggregatedAgentAIMetricResource"},"readOnly":true}},"required":["groupName","metrics"]},"AggregatedAgentAIMetricResource":{"type":"object","properties":{"startTimestamp":{"type":"integer","format":"int64","description":"The start timestamp of the metric aggregation period in milliseconds since epoch","example":1704067200000,"readOnly":true},"endTimestamp":{"type":"integer","format":"int64","description":"The end timestamp of the metric aggregation period in milliseconds since epoch","example":1704153600000,"readOnly":true},"agent":{"type":"string","description":"The unique identifier or name of the AI agent","example":"agent-1234","readOnly":true},"metricResult":{"type":"number","description":"The aggregated metric value for the specified metric type","example":1234.56,"readOnly":true},"metricType":{"type":"string","description":"The type of metric being aggregated (e.g., TOTAL_COST, TOTAL_TOKENS, AVERAGE_COST)","example":"TOTAL_COST_BY_AGENT","readOnly":true}},"required":["agent","endTimestamp","metricResult","metricType","startTimestamp"]},"AggregatedAgentAIMetricsTimestampGroupResource":{"type":"object","properties":{"startTimestamp":{"type":"integer","format":"int64","description":"The start timestamp of the metric aggregation period in milliseconds since epoch","example":1704067200000,"readOnly":true},"endTimestamp":{"type":"integer","format":"int64","description":"The end timestamp of the metric aggregation period in milliseconds since epoch","example":1704153600000,"readOnly":true},"totalAverage":{"type":["number","null"],"format":"double","description":"The average value of all metrics within this time period","example":567.89,"readOnly":true},"groups":{"type":"array","description":"The list of agent metric groups within this time period","items":{"$ref":"#/components/schemas/AggregatedAgentAIMetricGroupResource"},"readOnly":true}},"required":["endTimestamp","groups","startTimestamp"]},"AIImageMetricPagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"aIImageMetricResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelAIImageMetricResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"AIImageMetricResource_Read":{"type":"object","description":"AI Image metric record with image-specific fields","properties":{"id":{"type":"string","description":"The unique identifier of the AI image metric","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"ai.image.metric","readOnly":true},"label":{"type":"string","description":"The AI image metric's label (automatically set to the transaction ID for display purposes)","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"transactionId":{"type":"string","description":"Unique identifier for this transaction.","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"traceId":{"type":["string","null"],"description":"Trace multiple AI operations belonging to same overall request","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"traceType":{"type":["string","null"],"description":"Categorical identifier for grouping similar workflows","example":"image_generation","readOnly":true},"source":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"team":{"$ref":"#/components/schemas/ResourceMetadata_Read","description":"The team (organization)","readOnly":true},"organization":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscriberCredential":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"product":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscriptionId":{"type":["string","null"],"description":"The subscription ID","readOnly":true},"subscriberEmail":{"type":["string","null"],"description":"The subscriber email","readOnly":true},"subscriberId":{"type":["string","null"],"description":"The ID of the subscriber from your system","example":"user-123","readOnly":true},"model":{"type":"string","description":"The AI model used","example":"dall-e-3","readOnly":true},"modelSource":{"type":["string","null"],"description":"The source of the AI model","example":"OPENAI","readOnly":true},"provider":{"type":"string","description":"The provider of the AI service","example":"OpenAI","readOnly":true},"totalCost":{"type":["number","null"],"description":"The total cost of the transaction. Null indicates pricing is not configured for this model/provider.","example":0.04,"readOnly":true},"costType":{"type":["string","null"],"description":"The type of cost associated with the transaction","enum":["AI","TEXT_TOKEN_INPUT","TEXT_TOKEN_OUTPUT","TEXT_TOKEN_CACHE_CREATION","TEXT_TOKEN_CACHE_READ","IMAGE_GENERATION","AUDIO_TRANSCRIPTION","AUDIO_GENERATION","VIDEO_GENERATION","CREDITS"],"example":"AI","readOnly":true},"requestTime":{"type":"string","description":"The time when the request was made (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:00Z","readOnly":true},"responseTime":{"type":"string","description":"The time when the response was received (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:05Z","readOnly":true},"requestDuration":{"type":"integer","format":"int64","description":"The total duration of the request in milliseconds","example":5000,"readOnly":true},"operationType":{"type":["string","null"],"description":"The type of operation performed","enum":["CHAT","GENERATE","EMBED","CLASSIFY","SUMMARIZE","TRANSLATE","OTHER","TOOL_CALL","RERANK","SEARCH","MODERATION","VISION","TRANSFORM","GUARDRAIL","AUDIO","VIDEO","IMAGE"],"example":"IMAGE","readOnly":true},"operationSubtype":{"type":["string","null"],"description":"Technical classification of the operation (generation, edit, variation)","example":"generation","readOnly":true},"taskType":{"type":["string","null"],"description":"The type of task performed","example":"image_generation","readOnly":true},"agent":{"type":["string","null"],"description":"The agent name","example":"image-gen-agent","readOnly":true},"environment":{"type":["string","null"],"description":"Deployment environment (production, staging, development, test)","example":"production","readOnly":true},"errorReported":{"type":["boolean","null"],"description":"Whether an error was reported","example":false,"readOnly":true},"errorReason":{"type":["string","null"],"description":"The details of the error that occurred","example":"Content policy violation","readOnly":true},"billingSkipped":{"type":["boolean","null"],"description":"Whether billing was skipped for this transaction","example":false,"readOnly":true},"skipReason":{"type":["string","null"],"description":"The reason billing was skipped","enum":["FREE_TIER","RATE_LIMITED","QUOTA_EXCEEDED","CONTENT_POLICY_VIOLATION","CAPACITY_UNAVAILABLE","SERVICE_UNAVAILABLE"],"example":"FREE_TIER","readOnly":true},"pricingTier":{"type":["string","null"],"description":"The pricing tier for discount calculation","enum":["STANDARD","BATCH"],"example":"STANDARD","readOnly":true},"billingUnit":{"type":["string","null"],"description":"The unit of billing (PER_IMAGE)","enum":["PER_TOKEN","PER_IMAGE","PER_SECOND","PER_MINUTE","PER_CHARACTER","CREDITS"],"example":"PER_IMAGE","readOnly":true},"requestedImageCount":{"type":["integer","null"],"format":"int32","description":"The number of images requested","example":2,"readOnly":true},"actualImageCount":{"type":["integer","null"],"format":"int32","description":"The number of images actually generated","example":2,"readOnly":true},"resolution":{"type":["string","null"],"description":"Image resolution (e.g., 1024x1024)","example":"1024x1024","readOnly":true},"quality":{"type":["string","null"],"description":"Image quality setting","example":"hd","readOnly":true},"style":{"type":["string","null"],"description":"Image style","example":"vivid","readOnly":true},"format":{"type":["string","null"],"description":"Image format/response format","example":"url","readOnly":true},"sourceImageProvided":{"type":["boolean","null"],"description":"Whether a source image was provided (for edits/variations)","example":true,"readOnly":true},"sourceTransactionId":{"type":["string","null"],"description":"Source transaction ID (for variations based on previous generations)","example":"txn-img-000","readOnly":true},"revisedPromptProvided":{"type":["boolean","null"],"description":"Whether a revised prompt was returned","example":true,"readOnly":true},"inputMessages":{"type":["string","null"],"description":"Input prompts/messages as JSON array. Only included when prompt capture is enabled.","readOnly":true},"outputResponse":{"type":["string","null"],"description":"Output response content as JSON. Only included when prompt capture is enabled.","readOnly":true},"promptsTruncated":{"type":["boolean","null"],"description":"Indicates if prompts were truncated due to size limits.","example":false,"readOnly":true},"hasPromptData":{"type":"boolean","description":"True if inputMessages or outputResponse is present.","example":true,"readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["id","label","resourceType"]},"EntityModelAIImageMetricResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the AI image metric","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"ai.image.metric","readOnly":true},"label":{"type":"string","description":"The AI image metric's label (automatically set to the transaction ID for display purposes)","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"transactionId":{"type":"string","description":"Unique identifier for this transaction.","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"traceId":{"type":["string","null"],"description":"Trace multiple AI operations belonging to same overall request","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"traceType":{"type":["string","null"],"description":"Categorical identifier for grouping similar workflows","example":"image_generation","readOnly":true},"source":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"team":{"$ref":"#/components/schemas/ResourceMetadata_Read","description":"The team (organization)","readOnly":true},"organization":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscriberCredential":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"product":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscriptionId":{"type":["string","null"],"description":"The subscription ID","readOnly":true},"subscriberEmail":{"type":["string","null"],"description":"The subscriber email","readOnly":true},"subscriberId":{"type":["string","null"],"description":"The ID of the subscriber from your system","example":"user-123","readOnly":true},"model":{"type":"string","description":"The AI model used","example":"dall-e-3","readOnly":true},"modelSource":{"type":["string","null"],"description":"The source of the AI model","example":"OPENAI","readOnly":true},"provider":{"type":"string","description":"The provider of the AI service","example":"OpenAI","readOnly":true},"totalCost":{"type":["number","null"],"description":"The total cost of the transaction. Null indicates pricing is not configured for this model/provider.","example":0.04,"readOnly":true},"costType":{"type":["string","null"],"description":"The type of cost associated with the transaction","enum":["AI","TEXT_TOKEN_INPUT","TEXT_TOKEN_OUTPUT","TEXT_TOKEN_CACHE_CREATION","TEXT_TOKEN_CACHE_READ","IMAGE_GENERATION","AUDIO_TRANSCRIPTION","AUDIO_GENERATION","VIDEO_GENERATION","CREDITS"],"example":"AI","readOnly":true},"requestTime":{"type":"string","description":"The time when the request was made (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:00Z","readOnly":true},"responseTime":{"type":"string","description":"The time when the response was received (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:05Z","readOnly":true},"requestDuration":{"type":"integer","format":"int64","description":"The total duration of the request in milliseconds","example":5000,"readOnly":true},"operationType":{"type":["string","null"],"description":"The type of operation performed","enum":["CHAT","GENERATE","EMBED","CLASSIFY","SUMMARIZE","TRANSLATE","OTHER","TOOL_CALL","RERANK","SEARCH","MODERATION","VISION","TRANSFORM","GUARDRAIL","AUDIO","VIDEO","IMAGE"],"example":"IMAGE","readOnly":true},"operationSubtype":{"type":["string","null"],"description":"Technical classification of the operation (generation, edit, variation)","example":"generation","readOnly":true},"taskType":{"type":["string","null"],"description":"The type of task performed","example":"image_generation","readOnly":true},"agent":{"type":["string","null"],"description":"The agent name","example":"image-gen-agent","readOnly":true},"environment":{"type":["string","null"],"description":"Deployment environment (production, staging, development, test)","example":"production","readOnly":true},"errorReported":{"type":["boolean","null"],"description":"Whether an error was reported","example":false,"readOnly":true},"errorReason":{"type":["string","null"],"description":"The details of the error that occurred","example":"Content policy violation","readOnly":true},"billingSkipped":{"type":["boolean","null"],"description":"Whether billing was skipped for this transaction","example":false,"readOnly":true},"skipReason":{"type":["string","null"],"description":"The reason billing was skipped","enum":["FREE_TIER","RATE_LIMITED","QUOTA_EXCEEDED","CONTENT_POLICY_VIOLATION","CAPACITY_UNAVAILABLE","SERVICE_UNAVAILABLE"],"example":"FREE_TIER","readOnly":true},"pricingTier":{"type":["string","null"],"description":"The pricing tier for discount calculation","enum":["STANDARD","BATCH"],"example":"STANDARD","readOnly":true},"billingUnit":{"type":["string","null"],"description":"The unit of billing (PER_IMAGE)","enum":["PER_TOKEN","PER_IMAGE","PER_SECOND","PER_MINUTE","PER_CHARACTER","CREDITS"],"example":"PER_IMAGE","readOnly":true},"requestedImageCount":{"type":["integer","null"],"format":"int32","description":"The number of images requested","example":2,"readOnly":true},"actualImageCount":{"type":["integer","null"],"format":"int32","description":"The number of images actually generated","example":2,"readOnly":true},"resolution":{"type":["string","null"],"description":"Image resolution (e.g., 1024x1024)","example":"1024x1024","readOnly":true},"quality":{"type":["string","null"],"description":"Image quality setting","example":"hd","readOnly":true},"style":{"type":["string","null"],"description":"Image style","example":"vivid","readOnly":true},"format":{"type":["string","null"],"description":"Image format/response format","example":"url","readOnly":true},"sourceImageProvided":{"type":["boolean","null"],"description":"Whether a source image was provided (for edits/variations)","example":true,"readOnly":true},"sourceTransactionId":{"type":["string","null"],"description":"Source transaction ID (for variations based on previous generations)","example":"txn-img-000","readOnly":true},"revisedPromptProvided":{"type":["boolean","null"],"description":"Whether a revised prompt was returned","example":true,"readOnly":true},"inputMessages":{"type":["string","null"],"description":"Input prompts/messages as JSON array. Only included when prompt capture is enabled.","readOnly":true},"outputResponse":{"type":["string","null"],"description":"Output response content as JSON. Only included when prompt capture is enabled.","readOnly":true},"promptsTruncated":{"type":["boolean","null"],"description":"Indicates if prompts were truncated due to size limits.","example":false,"readOnly":true},"hasPromptData":{"type":"boolean","description":"True if inputMessages or outputResponse is present.","example":true,"readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["id","label","resourceType"]},"DataSourceConnectionResource_Read":{"type":"object","description":"Whether at least one event has been received from a given data source, and when the most recent one arrived","properties":{"connected":{"type":"boolean","description":"Whether at least one event has been received from this source for the tenant","example":true},"lastReceived":{"type":["string","null"],"format":"date-time","description":"Timestamp of the most recently received event from this source, or null if this source has never been connected","example":"2024-09-01T12:00:00Z"}},"required":["connected"]},"TenantDataSourceStatusResource_Read":{"type":"object","description":"Per-source data-connection status for the current tenant, broken out by ingestion pathway","properties":{"providerBilling":{"$ref":"#/components/schemas/DataSourceConnectionResource_Read","description":"Provider billing/usage sync (e.g. Cursor admin API). lastReceived is day-level precision only (normalized to midnight UTC) — provider-billing syncs are not timestamped to the moment."},"sdkMetering":{"$ref":"#/components/schemas/DataSourceConnectionResource_Read","description":"Direct SDK/API AI metering, excluding coding-assistant traffic"},"codingAssistant":{"$ref":"#/components/schemas/DataSourceConnectionResource_Read","description":"Coding-assistant OTLP telemetry"},"traces":{"$ref":"#/components/schemas/DataSourceConnectionResource_Read","description":"Multi-hop distributed AI traces"}},"required":["codingAssistant","providerBilling","sdkMetering","traces"]},"AggregatedTeamAIMetricsGroupResource":{"type":"object","properties":{"groupName":{"type":"string","description":"The name of the grouping dimension (e.g., team name, time period)","example":"Engineering Team","readOnly":true},"metrics":{"type":"array","description":"The list of aggregated team AI metrics within this group","items":{"$ref":"#/components/schemas/AggregatedTeamAIMetricsResource"},"readOnly":true}},"required":["groupName","metrics"]},"AggregatedTeamAIMetricsResource":{"type":"object","properties":{"startTimestamp":{"type":"integer","format":"int64","description":"The start timestamp of the metric aggregation period in milliseconds since epoch","example":1704067200000,"readOnly":true},"endTimestamp":{"type":"integer","format":"int64","description":"The end timestamp of the metric aggregation period in milliseconds since epoch","example":1704153600000,"readOnly":true},"teamId":{"type":"string","description":"The unique identifier of the team","example":"a91XJp","readOnly":true},"teamName":{"type":"string","description":"The name of the team","example":"Engineering Team","readOnly":true},"metricResult":{"type":"number","description":"The aggregated metric value for the specified metric type","example":1234.56,"readOnly":true},"metricType":{"type":"string","description":"The type of metric being aggregated (e.g., TOTAL_COST, TOTAL_TOKENS, AVERAGE_COST)","example":"TOTAL_COST_BY_TEAM","readOnly":true}},"required":["endTimestamp","metricResult","metricType","startTimestamp","teamId","teamName"]},"AggregatedTeamAIMetricsTimestampGroupResource":{"type":"object","properties":{"startTimestamp":{"type":"integer","format":"int64","description":"The start timestamp of the metric aggregation period in milliseconds since epoch","example":1704067200000,"readOnly":true},"endTimestamp":{"type":"integer","format":"int64","description":"The end timestamp of the metric aggregation period in milliseconds since epoch","example":1704153600000,"readOnly":true},"groups":{"type":"array","description":"The list of team metric groups within this time period","items":{"$ref":"#/components/schemas/AggregatedTeamAIMetricsGroupResource"},"readOnly":true}},"required":["endTimestamp","groups","startTimestamp"]},"AggregatedCredentialAIMetricGroupResource":{"type":"object","properties":{"groupName":{"type":"string","description":"The name of the grouping dimension (e.g., credential name, time period)","example":"Production API Key","readOnly":true},"metrics":{"type":"array","description":"The list of aggregated credential AI metrics within this group","items":{"$ref":"#/components/schemas/AggregatedCredentialAIMetricResource"},"readOnly":true}},"required":["groupName","metrics"]},"AggregatedCredentialAIMetricResource":{"type":"object","properties":{"startTimestamp":{"type":"integer","format":"int64","description":"The start timestamp of the metric aggregation period in milliseconds since epoch","example":1704067200000,"readOnly":true},"endTimestamp":{"type":"integer","format":"int64","description":"The end timestamp of the metric aggregation period in milliseconds since epoch","example":1704153600000,"readOnly":true},"credentialName":{"type":"string","description":"The name of the API credential/key","example":"Production API Key","readOnly":true},"credentialId":{"type":"string","description":"The unique identifier of the API credential/key","example":"af75417c71d24e708f506596ce5ab675","readOnly":true},"metricResult":{"type":"number","description":"The aggregated metric value for the specified metric type","example":1234.56,"readOnly":true},"metricType":{"type":"string","description":"The type of metric being aggregated (e.g., TOTAL_COST, TOTAL_TOKENS, AVERAGE_COST)","example":"TOTAL_COST_BY_CREDENTIAL","readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["credentialId","credentialName","endTimestamp","metricResult","metricType","startTimestamp"]},"AggregatedCredentialAIMetricTimestampGroupResource":{"type":"object","properties":{"startTimestamp":{"type":"integer","format":"int64","description":"The start timestamp of the metric aggregation period in milliseconds since epoch","example":1704067200000,"readOnly":true},"endTimestamp":{"type":"integer","format":"int64","description":"The end timestamp of the metric aggregation period in milliseconds since epoch","example":1704153600000,"readOnly":true},"groups":{"type":"array","description":"The list of credential metric groups within this time period","items":{"$ref":"#/components/schemas/AggregatedCredentialAIMetricGroupResource"},"readOnly":true}},"required":["endTimestamp","groups","startTimestamp"]},"AICompletionMetricPagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"aICompletionMetricResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelAICompletionMetricResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"EntityModelAICompletionMetricResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the AI completion metric","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"ai.completion.metric","readOnly":true},"label":{"type":"string","description":"The AI completion metric's label (automatically set to the transaction ID for display purposes)","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp  (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp  (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"transactionId":{"type":"string","description":"Alias for spanId. Both fields contain the same value.","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"spanId":{"type":"string","description":"Unique identifier for this transaction.","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"source":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"team":{"$ref":"#/components/schemas/ResourceMetadata_Read","description":"The team","readOnly":true},"organization":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscriberCredential":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscriptionId":{"type":["string","null"],"description":"The subscription ID","readOnly":true},"subscriberEmail":{"type":["string","null"],"description":"The subscriber email","readOnly":true},"subscriberId":{"type":["string","null"],"description":"Populate the ID of the subscriber from your system to allow Revenium to track usage & costs for individual users.  i.e. user-123.  If several subscriberCredentials have the same subscriberId, Revenium’s reporting will show usage for the entire organization broken down by user.","example":"user-123","readOnly":true},"product":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"model":{"type":"string","description":"The AI model used for the completion","example":"gpt-3.5-turbo","readOnly":true},"modelSource":{"type":["string","null"],"description":"The source of the AI model used for the completion","example":"ANTHROPIC","readOnly":true},"systemFingerprint":{"type":["string","null"],"description":"A unique identifier that represents the statistical signature of the language model that generated a specific chat completion. This fingerprint can be used for model attribution, debugging, and monitoring model behavior across request","example":"fp_44z789a1c23def456gh7890ijkl1234mnopq567rstuv8910wxyz","readOnly":true},"temperature":{"type":["number","null"],"format":"double","description":"The temperature setting used for the LLM completion","example":0.78,"readOnly":true},"responseQualityScore":{"type":["number","null"],"format":"double","description":"The quality score of the response","example":45,"readOnly":true},"inputTokenCount":{"type":"integer","format":"int64","description":"The number of tokens in the input","example":50,"readOnly":true},"completionTokenCount":{"type":"integer","format":"int64","description":"The number of tokens in the output","example":150,"readOnly":true},"reasoningTokenCount":{"type":"integer","format":"int64","description":"The number of tokens used for reasoning","example":100,"readOnly":true},"cachedTokenCount":{"type":"integer","format":"int64","description":"The number of tokens retrieved from cache","example":20,"readOnly":true},"cacheCreationTokenCount":{"type":["integer","null"],"format":"int64","description":"The number of cached creation tokens in the completion","example":1300,"readOnly":true},"cacheReadTokenCount":{"type":["integer","null"],"format":"int64","description":"The number of cached read tokens in the completion","example":1300,"readOnly":true},"totalTokenCount":{"type":"integer","format":"int64","description":"The total number of tokens used","example":350,"readOnly":true},"tokensPerMinute":{"type":"number","format":"double","description":"The number of tokens processed per minute","example":52.12,"readOnly":true},"stopReason":{"type":"string","description":"The reason for stopping the completion","enum":["END","END_SEQUENCE","TIMEOUT","TOKEN_LIMIT","COST_LIMIT","COMPLETION_LIMIT","ERROR","CANCELLED","CONTENT_FILTER","TOOL_CALL"],"example":"END","readOnly":true},"inputTokenCost":{"type":"number","description":"The input token cost of the transaction","example":0.0005,"readOnly":true},"outputTokenCost":{"type":"number","description":"The output token cost of the transaction","example":0.00021,"readOnly":true},"totalCost":{"type":"number","description":"The total token cost of the transaction","example":0.00021,"readOnly":true},"costType":{"type":["string","null"],"description":"The type of cost associated with the transaction","enum":["AI","TEXT_TOKEN_INPUT","TEXT_TOKEN_OUTPUT","TEXT_TOKEN_CACHE_CREATION","TEXT_TOKEN_CACHE_READ","IMAGE_GENERATION","AUDIO_TRANSCRIPTION","AUDIO_GENERATION","VIDEO_GENERATION","CREDITS"],"example":"AI","readOnly":true},"requestTime":{"type":"string","description":"The time when the request was made","example":"2025-09-01T00:00:00Z","readOnly":true},"responseTime":{"type":"string","description":"The time when the response was received  (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:01Z","readOnly":true},"completionStartTime":{"type":"string","description":"The start time of the completion  (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:01Z","readOnly":true},"timeToFirstToken":{"type":["integer","null"],"format":"int64","description":"The time to the first token (in milliseconds)","example":12000,"readOnly":true},"operationType":{"type":["string","null"],"description":"The type of operation performed","enum":["CHAT","GENERATE","EMBED","CLASSIFY","SUMMARIZE","TRANSLATE","OTHER","TOOL_CALL","RERANK","SEARCH","MODERATION","VISION","TRANSFORM","GUARDRAIL","AUDIO","VIDEO","IMAGE"],"example":"CHAT","readOnly":true},"requestDuration":{"type":"integer","format":"int64","description":"The total duration of the request","example":120022,"readOnly":true},"provider":{"type":"string","description":"The provider of the AI service","example":"OpenAI","readOnly":true},"taskType":{"type":["string","null"],"description":"The type of task performed","example":"completion","readOnly":true},"agent":{"type":["string","null"],"description":"The agent","example":"Bishop","readOnly":true},"traceId":{"type":["string","null"],"description":"Trace multiple LLM calls belonging to same overall request","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"errorReason":{"type":["string","null"],"description":"The details of the error that occurred during the LLM completion","example":"key not allowed to access model","readOnly":true},"mediationLatency":{"type":["integer","null"],"format":"int64","description":"The latency, in milliseconds, of latency by an AI or API gateway","example":1000,"readOnly":true},"middlewareSource":{"type":["string","null"],"description":"The source middleware or SDK that generated this AI completion request","example":"openai-python-sdk","readOnly":true},"environment":{"type":["string","null"],"description":"Deployment environment (production, staging, development, test)","example":"production","readOnly":true},"operationSubtype":{"type":["string","null"],"description":"Technical classification of the operation (web_search, function_call, code_interpreter, etc.)","example":"web_search","readOnly":true},"parentTransactionId":{"type":["string","null"],"description":"Alias for parentSpanId. Both fields contain the same value.","example":"parent-txn-123e4567-e89b-12d3-a456-426614174000","readOnly":true},"parentSpanId":{"type":["string","null"],"description":"Parent span ID for hierarchical tracing.","example":"parent-txn-123e4567-e89b-12d3-a456-426614174000","readOnly":true},"transactionName":{"type":["string","null"],"description":"Human-readable name for this transaction (Summarize Application, Credit Risk Analysis, etc.)","example":"Summarize Application","readOnly":true},"region":{"type":["string","null"],"description":"Cloud region or geographic location (us-east-1, eu-west-1, etc.)","example":"us-east-1","readOnly":true},"retryNumber":{"type":["integer","null"],"format":"int32","description":"Retry attempt number (0 = first attempt, 1 = first retry, etc.)","example":0,"readOnly":true},"traceType":{"type":["string","null"],"description":"Categorical identifier for grouping similar workflows (e.g., 'create_video', 'write_script')","example":"document_analysis","readOnly":true},"traceName":{"type":["string","null"],"description":"Human-readable label for individual trace instances (e.g., 'Marketing Video Q4 2025')","example":"Customer Onboarding - Acme Corp","readOnly":true},"transactionCount":{"type":["integer","null"],"format":"int64","description":"Total number of transactions sharing the same traceId across all pages. For records with null traceId, this returns 1.","example":4,"readOnly":true},"squadId":{"type":["string","null"],"description":"Identifier for multi-agent framework team or squad (e.g., ARK, CrewAI). Used to group AI operations by agent team for analytics and cost tracking.","example":"research-squad","readOnly":true},"squadName":{"type":["string","null"],"description":"Human-readable name for the multi-agent squad. Provides a friendly label for the squad in analytics dashboards.","example":"Research Team","readOnly":true},"squadRole":{"type":["string","null"],"description":"The role this agent plays within the squad (e.g., coordinator, researcher, executor). Used to analyze performance by role within multi-agent workflows.","example":"coordinator","readOnly":true},"systemPrompt":{"type":["string","null"],"description":"System prompt/instructions sent to the model. Only included when prompt capture is enabled.","readOnly":true},"inputMessages":{"type":["string","null"],"description":"User input messages as JSON array. Only included when prompt capture is enabled.","readOnly":true},"outputResponse":{"type":["string","null"],"description":"Assistant output/response content. Only included when prompt capture is enabled.","readOnly":true},"promptsTruncated":{"type":["boolean","null"],"description":"Indicates if prompts were truncated due to size limits.","example":false,"readOnly":true},"hasPromptData":{"type":"boolean","description":"Convenience flag indicating if any prompt data is available. True if any of systemPrompt, inputMessages, or outputResponse is non-null. Computed by the mapper layer (BE-6).","example":true,"readOnly":true},"isStreamed":{"type":"boolean","description":"Indicates if the completion was streamed. The `streamed` field is the preferred name per Metering API v2.0.0 and mirrors this field.","example":false,"readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["id","label","resourceType"]},"AICompletionMetricResource":{"type":"object","description":"The AI completion metric","properties":{"id":{"type":"string","description":"The unique identifier of the AI completion metric","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"ai.completion.metric","readOnly":true},"label":{"type":"string","description":"The AI completion metric's label (automatically set to the transaction ID for display purposes)","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp  (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp  (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"transactionId":{"type":"string","description":"Alias for spanId. Both fields contain the same value.","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"spanId":{"type":"string","description":"Unique identifier for this transaction.","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"source":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"team":{"$ref":"#/components/schemas/ResourceMetadata","description":"The team","readOnly":true},"organization":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"subscriberCredential":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"subscriptionId":{"type":["string","null"],"description":"The subscription ID","readOnly":true},"subscriberEmail":{"type":["string","null"],"description":"The subscriber email","readOnly":true},"subscriberId":{"type":["string","null"],"description":"Populate the ID of the subscriber from your system to allow Revenium to track usage & costs for individual users.  i.e. user-123.  If several subscriberCredentials have the same subscriberId, Revenium’s reporting will show usage for the entire organization broken down by user.","example":"user-123","readOnly":true},"product":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"model":{"type":"string","description":"The AI model used for the completion","example":"gpt-3.5-turbo","readOnly":true},"modelSource":{"type":["string","null"],"description":"The source of the AI model used for the completion","example":"ANTHROPIC","readOnly":true},"systemFingerprint":{"type":["string","null"],"description":"A unique identifier that represents the statistical signature of the language model that generated a specific chat completion. This fingerprint can be used for model attribution, debugging, and monitoring model behavior across request","example":"fp_44z789a1c23def456gh7890ijkl1234mnopq567rstuv8910wxyz","readOnly":true},"temperature":{"type":["number","null"],"format":"double","description":"The temperature setting used for the LLM completion","example":0.78,"readOnly":true},"responseQualityScore":{"type":["number","null"],"format":"double","description":"The quality score of the response","example":45,"readOnly":true},"inputTokenCount":{"type":"integer","format":"int64","description":"The number of tokens in the input","example":50,"readOnly":true},"completionTokenCount":{"type":"integer","format":"int64","description":"The number of tokens in the output","example":150,"readOnly":true},"reasoningTokenCount":{"type":"integer","format":"int64","description":"The number of tokens used for reasoning","example":100,"readOnly":true},"cachedTokenCount":{"type":"integer","format":"int64","description":"The number of tokens retrieved from cache","example":20,"readOnly":true},"cacheCreationTokenCount":{"type":["integer","null"],"format":"int64","description":"The number of cached creation tokens in the completion","example":1300,"readOnly":true},"cacheReadTokenCount":{"type":["integer","null"],"format":"int64","description":"The number of cached read tokens in the completion","example":1300,"readOnly":true},"totalTokenCount":{"type":"integer","format":"int64","description":"The total number of tokens used","example":350,"readOnly":true},"tokensPerMinute":{"type":"number","format":"double","description":"The number of tokens processed per minute","example":52.12,"readOnly":true},"stopReason":{"type":"string","description":"The reason for stopping the completion","enum":["END","END_SEQUENCE","TIMEOUT","TOKEN_LIMIT","COST_LIMIT","COMPLETION_LIMIT","ERROR","CANCELLED","CONTENT_FILTER","TOOL_CALL"],"example":"END","readOnly":true},"inputTokenCost":{"type":"number","description":"The input token cost of the transaction","example":0.0005,"readOnly":true},"outputTokenCost":{"type":"number","description":"The output token cost of the transaction","example":0.00021,"readOnly":true},"totalCost":{"type":"number","description":"The total token cost of the transaction","example":0.00021,"readOnly":true},"costType":{"type":["string","null"],"description":"The type of cost associated with the transaction","enum":["AI","TEXT_TOKEN_INPUT","TEXT_TOKEN_OUTPUT","TEXT_TOKEN_CACHE_CREATION","TEXT_TOKEN_CACHE_READ","IMAGE_GENERATION","AUDIO_TRANSCRIPTION","AUDIO_GENERATION","VIDEO_GENERATION","CREDITS"],"example":"AI","readOnly":true},"requestTime":{"type":"string","description":"The time when the request was made","example":"2025-09-01T00:00:00Z","readOnly":true},"responseTime":{"type":"string","description":"The time when the response was received  (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:01Z","readOnly":true},"completionStartTime":{"type":"string","description":"The start time of the completion  (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:01Z","readOnly":true},"timeToFirstToken":{"type":["integer","null"],"format":"int64","description":"The time to the first token (in milliseconds)","example":12000,"readOnly":true},"operationType":{"type":["string","null"],"description":"The type of operation performed","enum":["CHAT","GENERATE","EMBED","CLASSIFY","SUMMARIZE","TRANSLATE","OTHER","TOOL_CALL","RERANK","SEARCH","MODERATION","VISION","TRANSFORM","GUARDRAIL","AUDIO","VIDEO","IMAGE"],"example":"CHAT","readOnly":true},"requestDuration":{"type":"integer","format":"int64","description":"The total duration of the request","example":120022,"readOnly":true},"provider":{"type":"string","description":"The provider of the AI service","example":"OpenAI","readOnly":true},"taskType":{"type":["string","null"],"description":"The type of task performed","example":"completion","readOnly":true},"agent":{"type":["string","null"],"description":"The agent","example":"Bishop","readOnly":true},"traceId":{"type":["string","null"],"description":"Trace multiple LLM calls belonging to same overall request","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"errorReason":{"type":["string","null"],"description":"The details of the error that occurred during the LLM completion","example":"key not allowed to access model","readOnly":true},"mediationLatency":{"type":["integer","null"],"format":"int64","description":"The latency, in milliseconds, of latency by an AI or API gateway","example":1000,"readOnly":true},"middlewareSource":{"type":["string","null"],"description":"The source middleware or SDK that generated this AI completion request","example":"openai-python-sdk","readOnly":true},"environment":{"type":["string","null"],"description":"Deployment environment (production, staging, development, test)","example":"production","readOnly":true},"operationSubtype":{"type":["string","null"],"description":"Technical classification of the operation (web_search, function_call, code_interpreter, etc.)","example":"web_search","readOnly":true},"parentTransactionId":{"type":["string","null"],"description":"Alias for parentSpanId. Both fields contain the same value.","example":"parent-txn-123e4567-e89b-12d3-a456-426614174000","readOnly":true},"parentSpanId":{"type":["string","null"],"description":"Parent span ID for hierarchical tracing.","example":"parent-txn-123e4567-e89b-12d3-a456-426614174000","readOnly":true},"transactionName":{"type":["string","null"],"description":"Human-readable name for this transaction (Summarize Application, Credit Risk Analysis, etc.)","example":"Summarize Application","readOnly":true},"region":{"type":["string","null"],"description":"Cloud region or geographic location (us-east-1, eu-west-1, etc.)","example":"us-east-1","readOnly":true},"retryNumber":{"type":["integer","null"],"format":"int32","description":"Retry attempt number (0 = first attempt, 1 = first retry, etc.)","example":0,"readOnly":true},"traceType":{"type":["string","null"],"description":"Categorical identifier for grouping similar workflows (e.g., 'create_video', 'write_script')","example":"document_analysis","readOnly":true},"traceName":{"type":["string","null"],"description":"Human-readable label for individual trace instances (e.g., 'Marketing Video Q4 2025')","example":"Customer Onboarding - Acme Corp","readOnly":true},"transactionCount":{"type":["integer","null"],"format":"int64","description":"Total number of transactions sharing the same traceId across all pages. For records with null traceId, this returns 1.","example":4,"readOnly":true},"squadId":{"type":["string","null"],"description":"Identifier for multi-agent framework team or squad (e.g., ARK, CrewAI). Used to group AI operations by agent team for analytics and cost tracking.","example":"research-squad","readOnly":true},"squadName":{"type":["string","null"],"description":"Human-readable name for the multi-agent squad. Provides a friendly label for the squad in analytics dashboards.","example":"Research Team","readOnly":true},"squadRole":{"type":["string","null"],"description":"The role this agent plays within the squad (e.g., coordinator, researcher, executor). Used to analyze performance by role within multi-agent workflows.","example":"coordinator","readOnly":true},"systemPrompt":{"type":["string","null"],"description":"System prompt/instructions sent to the model. Only included when prompt capture is enabled.","readOnly":true},"inputMessages":{"type":["string","null"],"description":"User input messages as JSON array. Only included when prompt capture is enabled.","readOnly":true},"outputResponse":{"type":["string","null"],"description":"Assistant output/response content. Only included when prompt capture is enabled.","readOnly":true},"promptsTruncated":{"type":["boolean","null"],"description":"Indicates if prompts were truncated due to size limits.","example":false,"readOnly":true},"hasPromptData":{"type":"boolean","description":"Convenience flag indicating if any prompt data is available. True if any of systemPrompt, inputMessages, or outputResponse is non-null. Computed by the mapper layer (BE-6).","example":true,"readOnly":true},"isStreamed":{"type":"boolean","description":"Indicates if the completion was streamed. The `streamed` field is the preferred name per Metering API v2.0.0 and mirrors this field.","example":false,"readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["id","label","resourceType"]},"PromptDataResource":{"type":"object","description":"Prompt data for an AI completion","properties":{"systemPrompt":{"type":["string","null"],"description":"System prompt/instructions sent to the model. Only included when prompt capture is enabled.","example":"You are a helpful assistant.","readOnly":true},"inputMessages":{"type":["string","null"],"description":"User input messages as JSON array. Only included when prompt capture is enabled.","example":[{"role":"user","content":"Hello, how are you?"}],"readOnly":true},"outputResponse":{"type":["string","null"],"description":"Assistant output/response content. Only included when prompt capture is enabled.","example":"I'm doing well, thank you for asking!","readOnly":true},"promptsTruncated":{"type":"boolean","description":"Indicates if prompts were truncated due to size limits. Always present in responses.","example":false,"readOnly":true}},"required":["promptsTruncated"]},"AICompletionMetricReferenceData":{"type":"object","properties":{"traceTypes":{"type":"array","items":{"type":"string"}},"stopReasons":{"type":"array","items":{"type":"string"}}}},"AIAudioMetricPagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"aIAudioMetricResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelAIAudioMetricResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"AIAudioMetricResource_Read":{"type":"object","description":"AI Audio metric record with audio-specific fields","properties":{"id":{"type":"string","description":"The unique identifier of the AI audio metric","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"ai.audio.metric","readOnly":true},"label":{"type":"string","description":"The AI audio metric's label (automatically set to the transaction ID for display purposes)","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"transactionId":{"type":"string","description":"Alias for spanId. Both fields contain the same value.","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"spanId":{"type":"string","description":"Unique identifier for this transaction.","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"traceId":{"type":["string","null"],"description":"Trace multiple AI operations belonging to same overall request","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"source":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"team":{"$ref":"#/components/schemas/ResourceMetadata_Read","description":"The team (organization)","readOnly":true},"organization":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscriberCredential":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"product":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscriptionId":{"type":["string","null"],"description":"The subscription ID","readOnly":true},"subscriberEmail":{"type":["string","null"],"description":"The subscriber email","readOnly":true},"subscriberId":{"type":["string","null"],"description":"The ID of the subscriber from your system","example":"user-123","readOnly":true},"model":{"type":"string","description":"The AI model used","example":"whisper-1","readOnly":true},"modelSource":{"type":["string","null"],"description":"The source of the AI model","example":"OPENAI","readOnly":true},"provider":{"type":"string","description":"The provider of the AI service","example":"OpenAI","readOnly":true},"totalCost":{"type":["number","null"],"description":"The total cost of the transaction. Null indicates pricing is not configured for this model/provider.","example":0.006,"readOnly":true},"costType":{"type":["string","null"],"description":"The type of cost associated with the transaction","enum":["AI","TEXT_TOKEN_INPUT","TEXT_TOKEN_OUTPUT","TEXT_TOKEN_CACHE_CREATION","TEXT_TOKEN_CACHE_READ","IMAGE_GENERATION","AUDIO_TRANSCRIPTION","AUDIO_GENERATION","VIDEO_GENERATION","CREDITS"],"example":"AI","readOnly":true},"requestTime":{"type":"string","description":"The time when the request was made (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:00Z","readOnly":true},"responseTime":{"type":"string","description":"The time when the response was received (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:05Z","readOnly":true},"requestDuration":{"type":"integer","format":"int64","description":"The total duration of the request in milliseconds","example":5000,"readOnly":true},"operationType":{"type":["string","null"],"description":"The type of operation performed","enum":["CHAT","GENERATE","EMBED","CLASSIFY","SUMMARIZE","TRANSLATE","OTHER","TOOL_CALL","RERANK","SEARCH","MODERATION","VISION","TRANSFORM","GUARDRAIL","AUDIO","VIDEO","IMAGE"],"example":"AUDIO","readOnly":true},"operationSubtype":{"type":["string","null"],"description":"Technical classification of the operation (transcription, tts, translation, realtime)","example":"transcription","readOnly":true},"taskType":{"type":["string","null"],"description":"The type of task performed","example":"transcription","readOnly":true},"agent":{"type":["string","null"],"description":"The agent name","example":"audio-agent","readOnly":true},"parentTransactionId":{"type":["string","null"],"description":"Alias for parentSpanId. Both fields contain the same value.","example":"parent-txn-123e4567-e89b-12d3-a456-426614174000","readOnly":true},"parentSpanId":{"type":["string","null"],"description":"Parent span ID for hierarchical tracing.","example":"parent-txn-123e4567-e89b-12d3-a456-426614174000","readOnly":true},"transactionName":{"type":["string","null"],"description":"Human-readable name for this transaction","example":"Transcribe Meeting Audio","readOnly":true},"traceType":{"type":["string","null"],"description":"Categorical identifier for grouping similar workflows","example":"transcription","readOnly":true},"traceName":{"type":["string","null"],"description":"Human-readable label for individual trace instances","example":"Q4 Sales Meeting Transcription","readOnly":true},"squadId":{"type":["string","null"],"description":"Identifier for multi-agent framework team or squad","example":"audio-processing-squad","readOnly":true},"environment":{"type":["string","null"],"description":"Deployment environment (production, staging, development, test)","example":"production","readOnly":true},"region":{"type":["string","null"],"description":"Cloud region or geographic location","example":"us-east-1","readOnly":true},"retryNumber":{"type":["integer","null"],"format":"int32","description":"Retry attempt number (0 = first attempt, 1 = first retry, etc.)","example":0,"readOnly":true},"middlewareSource":{"type":["string","null"],"description":"The source middleware or SDK that generated this AI request","example":"openai-python-sdk","readOnly":true},"errorCode":{"type":["integer","null"],"format":"int32","description":"The error code if an error occurred","example":429,"readOnly":true},"errorReason":{"type":["string","null"],"description":"The details of the error that occurred","example":"Rate limit exceeded","readOnly":true},"billingSkipped":{"type":["boolean","null"],"description":"Whether billing was skipped for this transaction","example":false,"readOnly":true},"skipReason":{"type":["string","null"],"description":"The reason billing was skipped","enum":["FREE_TIER","RATE_LIMITED","QUOTA_EXCEEDED","CONTENT_POLICY_VIOLATION","CAPACITY_UNAVAILABLE","SERVICE_UNAVAILABLE"],"example":"FREE_TIER","readOnly":true},"pricingTier":{"type":["string","null"],"description":"The pricing tier for discount calculation","enum":["STANDARD","BATCH"],"example":"STANDARD","readOnly":true},"billingUnit":{"type":["string","null"],"description":"The unit of billing (PER_MINUTE, PER_CHARACTER, PER_TOKEN)","enum":["PER_TOKEN","PER_IMAGE","PER_SECOND","PER_MINUTE","PER_CHARACTER","CREDITS"],"example":"PER_MINUTE","readOnly":true},"requestedServiceTier":{"type":["string","null"],"description":"The service tier requested by the client","example":"default","readOnly":true},"actualServiceTier":{"type":["string","null"],"description":"The actual service tier used for the request","example":"scale","readOnly":true},"durationSeconds":{"type":["number","null"],"format":"double","description":"The duration of the audio in seconds (for transcription/translation)","example":120.5,"readOnly":true},"inputAudioTokenCount":{"type":["integer","null"],"format":"int64","description":"Number of input audio tokens (for realtime audio)","example":1500,"readOnly":true},"outputAudioTokenCount":{"type":["integer","null"],"format":"int64","description":"Number of output audio tokens (for realtime audio)","example":2000,"readOnly":true},"characterCount":{"type":["integer","null"],"format":"int64","description":"Number of characters processed (for TTS)","example":500,"readOnly":true},"sampleRate":{"type":["integer","null"],"format":"int32","description":"Audio sample rate in Hz","example":44100,"readOnly":true},"language":{"type":["string","null"],"description":"Language code for the audio","example":"en","readOnly":true},"responseFormat":{"type":["string","null"],"description":"The response format (json, text, srt, vtt, verbose_json)","example":"json","readOnly":true},"voice":{"type":["string","null"],"description":"Voice name used for TTS","example":"alloy","readOnly":true},"speed":{"type":["number","null"],"format":"double","description":"Speed multiplier for TTS","example":1,"readOnly":true},"sourceLanguage":{"type":["string","null"],"description":"Source language for translation","example":"en","readOnly":true},"targetLanguage":{"type":["string","null"],"description":"Target language for translation","example":"es","readOnly":true},"audioFormat":{"type":["string","null"],"description":"Audio format (mp3, opus, aac, flac, wav, pcm)","example":"mp3","readOnly":true},"quality":{"type":["string","null"],"description":"Audio quality (standard, hd)","example":"hd","readOnly":true},"realtime":{"type":["boolean","null"],"description":"Whether this was a realtime audio operation","example":false,"readOnly":true},"inputTextTokenCount":{"type":["integer","null"],"format":"int64","description":"Number of input text tokens (for realtime audio with text)","example":100,"readOnly":true},"outputTextTokenCount":{"type":["integer","null"],"format":"int64","description":"Number of output text tokens (for realtime audio with text)","example":150,"readOnly":true},"inputMessages":{"type":["string","null"],"description":"Input prompts/messages as JSON array. Only included when prompt capture is enabled.","readOnly":true},"outputResponse":{"type":["string","null"],"description":"Output response content as JSON. Only included when prompt capture is enabled.","readOnly":true},"promptsTruncated":{"type":["boolean","null"],"description":"Indicates if prompts were truncated due to size limits.","example":false,"readOnly":true},"hasPromptData":{"type":"boolean","description":"True if inputMessages or outputResponse is present.","example":true,"readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["id","label","resourceType"]},"EntityModelAIAudioMetricResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the AI audio metric","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"ai.audio.metric","readOnly":true},"label":{"type":"string","description":"The AI audio metric's label (automatically set to the transaction ID for display purposes)","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"transactionId":{"type":"string","description":"Alias for spanId. Both fields contain the same value.","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"spanId":{"type":"string","description":"Unique identifier for this transaction.","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"traceId":{"type":["string","null"],"description":"Trace multiple AI operations belonging to same overall request","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"source":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"team":{"$ref":"#/components/schemas/ResourceMetadata_Read","description":"The team (organization)","readOnly":true},"organization":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscriberCredential":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"product":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"subscriptionId":{"type":["string","null"],"description":"The subscription ID","readOnly":true},"subscriberEmail":{"type":["string","null"],"description":"The subscriber email","readOnly":true},"subscriberId":{"type":["string","null"],"description":"The ID of the subscriber from your system","example":"user-123","readOnly":true},"model":{"type":"string","description":"The AI model used","example":"whisper-1","readOnly":true},"modelSource":{"type":["string","null"],"description":"The source of the AI model","example":"OPENAI","readOnly":true},"provider":{"type":"string","description":"The provider of the AI service","example":"OpenAI","readOnly":true},"totalCost":{"type":["number","null"],"description":"The total cost of the transaction. Null indicates pricing is not configured for this model/provider.","example":0.006,"readOnly":true},"costType":{"type":["string","null"],"description":"The type of cost associated with the transaction","enum":["AI","TEXT_TOKEN_INPUT","TEXT_TOKEN_OUTPUT","TEXT_TOKEN_CACHE_CREATION","TEXT_TOKEN_CACHE_READ","IMAGE_GENERATION","AUDIO_TRANSCRIPTION","AUDIO_GENERATION","VIDEO_GENERATION","CREDITS"],"example":"AI","readOnly":true},"requestTime":{"type":"string","description":"The time when the request was made (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:00Z","readOnly":true},"responseTime":{"type":"string","description":"The time when the response was received (ISO 8601 extended date-time format)","example":"2025-09-01T00:00:05Z","readOnly":true},"requestDuration":{"type":"integer","format":"int64","description":"The total duration of the request in milliseconds","example":5000,"readOnly":true},"operationType":{"type":["string","null"],"description":"The type of operation performed","enum":["CHAT","GENERATE","EMBED","CLASSIFY","SUMMARIZE","TRANSLATE","OTHER","TOOL_CALL","RERANK","SEARCH","MODERATION","VISION","TRANSFORM","GUARDRAIL","AUDIO","VIDEO","IMAGE"],"example":"AUDIO","readOnly":true},"operationSubtype":{"type":["string","null"],"description":"Technical classification of the operation (transcription, tts, translation, realtime)","example":"transcription","readOnly":true},"taskType":{"type":["string","null"],"description":"The type of task performed","example":"transcription","readOnly":true},"agent":{"type":["string","null"],"description":"The agent name","example":"audio-agent","readOnly":true},"parentTransactionId":{"type":["string","null"],"description":"Alias for parentSpanId. Both fields contain the same value.","example":"parent-txn-123e4567-e89b-12d3-a456-426614174000","readOnly":true},"parentSpanId":{"type":["string","null"],"description":"Parent span ID for hierarchical tracing.","example":"parent-txn-123e4567-e89b-12d3-a456-426614174000","readOnly":true},"transactionName":{"type":["string","null"],"description":"Human-readable name for this transaction","example":"Transcribe Meeting Audio","readOnly":true},"traceType":{"type":["string","null"],"description":"Categorical identifier for grouping similar workflows","example":"transcription","readOnly":true},"traceName":{"type":["string","null"],"description":"Human-readable label for individual trace instances","example":"Q4 Sales Meeting Transcription","readOnly":true},"squadId":{"type":["string","null"],"description":"Identifier for multi-agent framework team or squad","example":"audio-processing-squad","readOnly":true},"environment":{"type":["string","null"],"description":"Deployment environment (production, staging, development, test)","example":"production","readOnly":true},"region":{"type":["string","null"],"description":"Cloud region or geographic location","example":"us-east-1","readOnly":true},"retryNumber":{"type":["integer","null"],"format":"int32","description":"Retry attempt number (0 = first attempt, 1 = first retry, etc.)","example":0,"readOnly":true},"middlewareSource":{"type":["string","null"],"description":"The source middleware or SDK that generated this AI request","example":"openai-python-sdk","readOnly":true},"errorCode":{"type":["integer","null"],"format":"int32","description":"The error code if an error occurred","example":429,"readOnly":true},"errorReason":{"type":["string","null"],"description":"The details of the error that occurred","example":"Rate limit exceeded","readOnly":true},"billingSkipped":{"type":["boolean","null"],"description":"Whether billing was skipped for this transaction","example":false,"readOnly":true},"skipReason":{"type":["string","null"],"description":"The reason billing was skipped","enum":["FREE_TIER","RATE_LIMITED","QUOTA_EXCEEDED","CONTENT_POLICY_VIOLATION","CAPACITY_UNAVAILABLE","SERVICE_UNAVAILABLE"],"example":"FREE_TIER","readOnly":true},"pricingTier":{"type":["string","null"],"description":"The pricing tier for discount calculation","enum":["STANDARD","BATCH"],"example":"STANDARD","readOnly":true},"billingUnit":{"type":["string","null"],"description":"The unit of billing (PER_MINUTE, PER_CHARACTER, PER_TOKEN)","enum":["PER_TOKEN","PER_IMAGE","PER_SECOND","PER_MINUTE","PER_CHARACTER","CREDITS"],"example":"PER_MINUTE","readOnly":true},"requestedServiceTier":{"type":["string","null"],"description":"The service tier requested by the client","example":"default","readOnly":true},"actualServiceTier":{"type":["string","null"],"description":"The actual service tier used for the request","example":"scale","readOnly":true},"durationSeconds":{"type":["number","null"],"format":"double","description":"The duration of the audio in seconds (for transcription/translation)","example":120.5,"readOnly":true},"inputAudioTokenCount":{"type":["integer","null"],"format":"int64","description":"Number of input audio tokens (for realtime audio)","example":1500,"readOnly":true},"outputAudioTokenCount":{"type":["integer","null"],"format":"int64","description":"Number of output audio tokens (for realtime audio)","example":2000,"readOnly":true},"characterCount":{"type":["integer","null"],"format":"int64","description":"Number of characters processed (for TTS)","example":500,"readOnly":true},"sampleRate":{"type":["integer","null"],"format":"int32","description":"Audio sample rate in Hz","example":44100,"readOnly":true},"language":{"type":["string","null"],"description":"Language code for the audio","example":"en","readOnly":true},"responseFormat":{"type":["string","null"],"description":"The response format (json, text, srt, vtt, verbose_json)","example":"json","readOnly":true},"voice":{"type":["string","null"],"description":"Voice name used for TTS","example":"alloy","readOnly":true},"speed":{"type":["number","null"],"format":"double","description":"Speed multiplier for TTS","example":1,"readOnly":true},"sourceLanguage":{"type":["string","null"],"description":"Source language for translation","example":"en","readOnly":true},"targetLanguage":{"type":["string","null"],"description":"Target language for translation","example":"es","readOnly":true},"audioFormat":{"type":["string","null"],"description":"Audio format (mp3, opus, aac, flac, wav, pcm)","example":"mp3","readOnly":true},"quality":{"type":["string","null"],"description":"Audio quality (standard, hd)","example":"hd","readOnly":true},"realtime":{"type":["boolean","null"],"description":"Whether this was a realtime audio operation","example":false,"readOnly":true},"inputTextTokenCount":{"type":["integer","null"],"format":"int64","description":"Number of input text tokens (for realtime audio with text)","example":100,"readOnly":true},"outputTextTokenCount":{"type":["integer","null"],"format":"int64","description":"Number of output text tokens (for realtime audio with text)","example":150,"readOnly":true},"inputMessages":{"type":["string","null"],"description":"Input prompts/messages as JSON array. Only included when prompt capture is enabled.","readOnly":true},"outputResponse":{"type":["string","null"],"description":"Output response content as JSON. Only included when prompt capture is enabled.","readOnly":true},"promptsTruncated":{"type":["boolean","null"],"description":"Indicates if prompts were truncated due to size limits.","example":false,"readOnly":true},"hasPromptData":{"type":"boolean","description":"True if inputMessages or outputResponse is present.","example":true,"readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["id","label","resourceType"]},"AggregatedAgentAIMetricGroupResource_Read":{"type":"object","properties":{"groupName":{"type":"string","description":"The name of the grouping dimension (e.g., agent name, time period)","example":"agent-1234","readOnly":true},"metrics":{"type":"array","description":"The list of aggregated agent AI metrics within this group","items":{"$ref":"#/components/schemas/AggregatedAgentAIMetricResource_Read"},"readOnly":true}},"required":["groupName","metrics"]},"AggregatedAgentAIMetricResource_Read":{"type":"object","properties":{"startTimestamp":{"type":"integer","format":"int64","description":"The start timestamp of the metric aggregation period in milliseconds since epoch","example":1704067200000,"readOnly":true},"endTimestamp":{"type":"integer","format":"int64","description":"The end timestamp of the metric aggregation period in milliseconds since epoch","example":1704153600000,"readOnly":true},"agent":{"type":"string","description":"The unique identifier or name of the AI agent","example":"agent-1234","readOnly":true},"metricResult":{"type":"number","description":"The aggregated metric value for the specified metric type","example":1234.56,"readOnly":true},"metricType":{"type":"string","description":"The type of metric being aggregated (e.g., TOTAL_COST, TOTAL_TOKENS, AVERAGE_COST)","example":"TOTAL_COST_BY_AGENT","readOnly":true}},"required":["agent","endTimestamp","metricResult","metricType","startTimestamp"]},"AggregatedAgentAIMetricsTimestampGroupResource_Read":{"type":"object","properties":{"startTimestamp":{"type":"integer","format":"int64","description":"The start timestamp of the metric aggregation period in milliseconds since epoch","example":1704067200000,"readOnly":true},"endTimestamp":{"type":"integer","format":"int64","description":"The end timestamp of the metric aggregation period in milliseconds since epoch","example":1704153600000,"readOnly":true},"totalAverage":{"type":["number","null"],"format":"double","description":"The average value of all metrics within this time period","example":567.89,"readOnly":true},"groups":{"type":"array","description":"The list of agent metric groups within this time period","items":{"$ref":"#/components/schemas/AggregatedAgentAIMetricGroupResource_Read"},"readOnly":true}},"required":["endTimestamp","groups","startTimestamp"]},"AIModelPagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"aIModelResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelAIModelResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"EntityModelAIModelResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the AI model","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"ai_model_metadata","readOnly":true},"label":{"type":"string","description":"The AI model's label (automatically set to the model name for display purposes)","example":"GPT-4 Turbo","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the model","example":"gpt-4-turbo"},"provider":{"type":"string","description":"The AI model provider. Allowed values: OPENAI, ANTHROPIC, OLLAMA, LITELLM, ALIBABA, GEMMA, DEEPSEEK, GOOGLE, GEMINI, AMAZON, CUSTOM","enum":["OPENAI","ANTHROPIC","OLLAMA","LITELLM","ALIBABA","GEMMA","DEEPSEEK","GOOGLE","GEMINI","AMAZON","CUSTOM"],"example":"OPENAI"},"inputCostPerToken":{"type":"number","description":"The cost per input token in USD","example":0.00001},"outputCostPerToken":{"type":"number","description":"The cost per output token in USD","example":0.00003},"cacheCreationCostPerInputToken":{"type":["number","null"],"description":"The cost per input token for cache creation in USD (for models that support prompt caching)","example":0.0000125},"cacheCreation1hrCostPerInputToken":{"type":["number","null"],"description":"The cost per input token for 1-hour-TTL cache creation in USD (for models that support prompt caching)","example":0.00002},"cacheReadCostPerInputToken":{"type":["number","null"],"description":"The cost per input token for cache reads in USD (for models that support prompt caching)","example":0.000001},"mode":{"type":"string","description":"The model mode or variant (e.g., 'chat', 'completion', 'embedding')","example":"chat"},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this AI model configuration. This field should be included in the request body when creating a new AI model.","example":"a91XJp","writeOnly":true},"supportFunctionCalling":{"type":["boolean","null"],"description":"Indicates if the model supports function calling","example":true},"supportsParallelFunctionCalling":{"type":["boolean","null"],"description":"Indicates if the model supports parallel function calling","example":true},"supportsResponseSchema":{"type":["boolean","null"],"description":"Indicates if the model supports response schema","example":true},"supportsVision":{"type":["boolean","null"],"description":"Indicates if the model supports vision capabilities","example":false},"supportsPromptCaching":{"type":["boolean","null"],"description":"Indicates if the model supports prompt caching","example":true},"supportsSystemMessages":{"type":["boolean","null"],"description":"Indicates if the model supports system messages","example":true},"supportsToolChoice":{"type":["boolean","null"],"description":"Indicates if the model supports tool choice","example":true},"supportsWebSearch":{"type":["boolean","null"],"description":"Indicates if the model supports web search","example":false},"pricingDimensions":{"type":"array","description":"All pricing dimensions for this model (token, image, audio, video, etc.). Empty if no dimensions are configured.","example":[],"items":{"$ref":"#/components/schemas/PricingDimensionResource_Read"},"readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["inputCostPerToken","name","outputCostPerToken","provider"]},"PricingCoverageResource_Read":{"type":"object","description":"Summary of pricing coverage indicating which billing units have pricing configured","properties":{"hasTokenPricing":{"type":"boolean","description":"True if the model has per-token pricing configured","example":true},"hasImagePricing":{"type":"boolean","description":"True if the model has per-image pricing configured","example":false},"hasAudioPricing":{"type":"boolean","description":"True if the model has audio pricing configured (per-second or per-minute)","example":false},"hasVideoPricing":{"type":"boolean","description":"True if the model has video pricing configured","example":false},"hasCharacterPricing":{"type":"boolean","description":"True if the model has per-character pricing configured (e.g., TTS)","example":false},"hasCreditsPricing":{"type":"boolean","description":"True if the model has credits-based pricing configured","example":false}}},"PricingResponse_Read":{"type":"object","description":"Multi-modal pricing information for an AI model","properties":{"modelId":{"type":"string","description":"The unique identifier of the AI model","example":"abc123"},"modelName":{"type":"string","description":"The name of the AI model","example":"gpt-4-vision"},"provider":{"type":"string","description":"The AI model provider","example":"OPENAI"},"dimensions":{"type":"array","description":"List of pricing dimensions for multi-modal pricing","items":{"$ref":"#/components/schemas/PricingDimensionResource_Read"}},"coverage":{"$ref":"#/components/schemas/PricingCoverageResource_Read","description":"Summary of pricing coverage by billing unit"}}},"AIModelRate_Read":{"type":"object","description":"Pricing rates for a single AI model","properties":{"model":{"type":"string","description":"Name of the AI model","example":"claude-sonnet-4-20250514","readOnly":true},"provider":{"type":"string","description":"AI provider name","example":"anthropic","readOnly":true},"inputPricePerMillion":{"type":"number","description":"Input token price per million tokens in USD","example":3,"readOnly":true},"outputPricePerMillion":{"type":"number","description":"Output token price per million tokens in USD","example":15,"readOnly":true},"cacheReadPricePerMillion":{"type":["number","null"],"description":"Cache read token price per million tokens in USD; null if model does not support prompt caching","example":0.3,"readOnly":true},"cacheWritePricePerMillion":{"type":["number","null"],"description":"Cache write token price per million tokens in USD; null if model does not support prompt caching","example":3.75,"readOnly":true}},"required":["inputPricePerMillion","model","outputPricePerMillion","provider"]},"AIModelRatesResponse_Read":{"type":"object","description":"Live pricing rates for all available AI models","properties":{"models":{"type":"array","description":"List of AI model rates","items":{"$ref":"#/components/schemas/AIModelRate_Read"},"readOnly":true}},"required":["models"]},"AIAnomalyPagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"aIAnomalyResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelAIAnomalyResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"EntityModelAIAnomalyResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the AI anomaly","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"ai_anomaly_metadata","readOnly":true},"label":{"type":"string","description":"The AI anomaly alert's label (automatically set to the alert name for display purposes)","example":"High Cost Anomaly - GPT-4","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"createdBy":{"type":["string","null"],"description":"The email address of the user who created this anomaly","example":"user@example.com","readOnly":true},"modifiedBy":{"type":["string","null"],"description":"The email address of the user who last modified this anomaly","example":"user@example.com","readOnly":true},"name":{"type":"string","description":"The name of the anomaly alert","example":"High Cost Alert"},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this anomaly alert.  The teamId can be found in the developer section of the Revenium web application.","example":"a91XJp","writeOnly":true},"alertType":{"type":"string","description":"The type of alert monitoring strategy. THRESHOLD monitors for absolute values exceeding a threshold, RELATIVE_CHANGE monitors for percentage changes between periods, CUMULATIVE_USAGE monitors for total usage over a period","enum":["THRESHOLD","RELATIVE_CHANGE","CUMULATIVE_USAGE"],"example":"THRESHOLD"},"dataSource":{"type":["string","null"],"description":"The data source for this alert. SDK uses real-time SDK instrumentation data, PROVIDER uses provider-synced billing data (OpenAI, Anthropic, etc.)","enum":["SDK","PROVIDER"],"example":"SDK"},"metricType":{"type":"string","description":"The AI metric to monitor. Cost metrics track spending, token metrics track usage, performance metrics track latency and duration, error metrics track failures","enum":["TOTAL_COST","COST_PER_TRANSACTION","TOKENS_PER_MINUTE","TOKEN_COUNT","INPUT_TOKEN_COUNT","OUTPUT_TOKEN_COUNT","CACHED_TOKEN_COUNT","TOKENS_PER_REQUEST","TIME_TO_FIRST_TOKEN","DURATION","ERROR_COUNT","ERROR_RATE","REQUESTS_PER_MINUTE","IMAGE_COUNT","DURATION_SECONDS","CHARACTER_COUNT","CREDITS_CONSUMED","COST_PER_IMAGE","COST_PER_SECOND","VIDEO_COUNT","AUDIO_COUNT"],"example":"TOTAL_COST"},"operatorType":{"type":"string","description":"The comparison operator used to evaluate the threshold. Comparison operators (GREATER_THAN, LESS_THAN, EQUAL_TO, NOT_EQUAL_TO, GREATER_THAN_OR_EQUAL_TO, LESS_THAN_OR_EQUAL_TO) compare absolute values. Change operators (PERCENT_INCREASE, PERCENT_DECREASE, INCREASES_BY, DECREASES_BY) compare relative changes between periods","enum":["GREATER_THAN","LESS_THAN","EQUAL_TO","NOT_EQUAL_TO","GREATER_THAN_OR_EQUAL_TO","LESS_THAN_OR_EQUAL_TO","PERCENT_DECREASE","PERCENT_INCREASE","INCREASES_BY","DECREASES_BY"],"example":"GREATER_THAN"},"threshold":{"type":"number","description":"The numeric threshold value that triggers the alert. For percentage-based alerts (when isPercentage is true), this represents the percentage value (e.g., 50 for 50%). For absolute value alerts, this is the metric value to compare against","example":100.5},"notificationAddresses":{"type":"array","description":"Email addresses to notify when the alert is triggered. Multiple addresses can be specified. Each address will receive an email notification when the anomaly condition is met","example":["admin@example.com","ops@example.com"],"items":{"type":"string"}},"slackConfigurations":{"type":"array","description":"Slack configuration IDs to notify when the alert is triggered. Each configuration represents a Slack workspace and channel where notifications will be posted","example":["slack-config-id-1","slack-config-id-2"],"items":{"type":"string"}},"description":{"type":["string","null"],"description":"Optional description providing additional context about the alert's purpose and configuration","example":"Monitors total AI costs to prevent budget overruns"},"periodDuration":{"type":["string","null"],"description":"The time period over which the metric is evaluated. For THRESHOLD and RELATIVE_CHANGE alerts, this determines the evaluation window. For CUMULATIVE_USAGE alerts, this determines the accumulation period","enum":["ONE_MINUTE","FIVE_MINUTES","FIFTEEN_MINUTES","THIRTY_MINUTES","ONE_HOUR","TWELVE_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","DAILY","WEEKLY","MONTHLY","QUARTERLY"],"example":"ONE_HOUR"},"enabled":{"type":"boolean","description":"Whether the anomaly alert is active. When false, the alert is disabled without being deleted from the database. Disabled alerts do not evaluate conditions or send notifications","example":true},"filters":{"type":["array","null"],"description":"Filter criteria to limit the scope of anomaly monitoring. Each filter specifies a dimension (e.g., ORGANIZATION, PRODUCT, MODEL), an operator (e.g., IS, CONTAINS), and a value to match. Only metrics matching all filters are evaluated","items":{"$ref":"#/components/schemas/AIAnomalyFilter_Read"}},"webhookConfigurations":{"type":"array","description":"Webhook configuration IDs to notify when the alert is triggered. Each configuration represents a webhook endpoint that will receive a POST request with alert details","example":["webhook-config-id-1"],"items":{"type":"string"}},"firing":{"type":"boolean","description":"Whether the anomaly alert is currently triggered. True indicates the alert condition is currently met and notifications have been sent. This is a read-only field automatically updated by the system","example":false,"readOnly":true},"groupBy":{"type":["string","null"],"description":"The dimension by which to group anomaly monitoring. When specified, separate alerts are evaluated for each unique value of this dimension (e.g., per ORGANIZATION, per MODEL, per PRODUCT)","enum":["ORGANIZATION","CREDENTIAL","PRODUCT","MODEL","PROVIDER","AGENT","SUBSCRIBER","TASK_TYPE","WORKSPACE","API_KEY"],"example":"MODEL"},"triggerAfterPersistsDuration":{"type":["string","null"],"description":"The duration the anomaly condition must persist before triggering the alert. This prevents false positives from transient spikes. If null, the alert triggers immediately when the condition is met","enum":["ONE_MINUTE","FIVE_MINUTES","FIFTEEN_MINUTES","THIRTY_MINUTES","ONE_HOUR","TWELVE_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","DAILY","WEEKLY","MONTHLY","QUARTERLY"],"example":"FIVE_MINUTES"},"isPercentage":{"type":["boolean","null"],"description":"Whether the threshold value represents a percentage. When true, the threshold is interpreted as a percentage value. When false or null, the threshold is an absolute value","example":false},"_links":{"$ref":"#/components/schemas/Links"}},"required":["alertType","enabled","firing","metricType","name","operatorType","periodDuration","teamId","threshold"]},"ApiKeyOption":{"type":"object","description":"A provider API key option for the filter dropdown (identifier and masked hint only)","properties":{"id":{"type":"string","description":"The provider's API key identifier (not the secret)","example":"apikey_011K4gLy"},"name":{"type":["string","null"],"description":"Human-readable API key name","example":"production-key"},"partialKeyHint":{"type":["string","null"],"description":"Masked hint of the key, never the raw secret","example":"sk-ant-...yQAA"},"provider":{"type":"string","description":"The provider this key belongs to","example":"anthropic"}}},"ProviderDimensionsResponse":{"type":"object","description":"Available options and capabilities for building provider-based alerts","properties":{"providers":{"type":"array","description":"Providers with synced data for this organization","example":["openai","anthropic"],"items":{"type":"string"}},"workspaces":{"type":"array","description":"Workspaces available for the workspace filter dropdown","items":{"$ref":"#/components/schemas/WorkspaceOption"}},"apiKeys":{"type":"array","description":"API keys available for the API key filter dropdown (identifiers and masked hints only, never raw secrets)","items":{"$ref":"#/components/schemas/ApiKeyOption"}},"models":{"type":"array","description":"Models seen in this organization's recent provider data","example":["gpt-4o","claude-3-5-sonnet"],"items":{"type":"string"}},"supportedMetricsByProvider":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Metrics supported per provider (cost is universal; tokens only where the provider emits them)"},"supportedDimensions":{"type":"array","description":"Dimensions supported for provider alert filters and grouping","example":["WORKSPACE","API_KEY","MODEL","PROVIDER"],"items":{"type":"string"}},"supportedPeriods":{"type":"array","description":"Tracking periods supported for provider alerts","example":["DAILY"],"items":{"type":"string"}},"lastSyncDate":{"type":["string","null"],"format":"date","description":"Most recent date with synced provider data, for the 'Data through' freshness display","example":"2026-06-21"}}},"WorkspaceOption":{"type":"object","description":"A provider workspace/project option for the filter dropdown","properties":{"id":{"type":"string","description":"The provider's workspace identifier","example":"proj_abc123"},"name":{"type":"string","description":"Human-readable workspace name","example":"Production"},"provider":{"type":"string","description":"The provider this workspace belongs to","example":"openai"}}},"AIAlertResource_Read":{"type":"object","description":"AI alert metadata","properties":{"id":{"type":"string","description":"The unique identifier of the AI alert","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"ai_alert_metadata","readOnly":true},"label":{"type":"string","description":"The AI alert's label (automatically set to a constant value by the system)","example":"ai_alert_metadata","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"createdBy":{"type":["string","null"],"description":"The email address of the user who created the alert rule that triggered this alert","example":"user@example.com","readOnly":true},"triggeredTimestamp":{"type":"string","description":"The triggered timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2025-09-01T00:00:00Z","readOnly":true},"resolvedTimestamp":{"type":["string","null"],"description":"The resolved timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2025-09-01T00:00:00Z","readOnly":true},"triggeredValue":{"type":"number","description":"The metric value that triggered the alert","example":125.5,"readOnly":true},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"anomaly":{"oneOf":[{"$ref":"#/components/schemas/AIAnomalyResource_Read"},{"type":"null"}]},"resolved":{"type":"boolean","description":"Whether the alert has been resolved","example":false,"readOnly":true},"duration":{"type":["integer","null"],"format":"int64","description":"The alert duration in milliseconds","example":3600000,"readOnly":true},"groupDisplayName":{"type":["string","null"],"description":"The name of the group that triggered this alert (e.g., organization name, model name)","example":"Acme Corp","readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["triggeredValue"]},"AIAlertResource":{"type":"object","description":"AI alert metadata","properties":{"id":{"type":"string","description":"The unique identifier of the AI alert","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"ai_alert_metadata","readOnly":true},"label":{"type":"string","description":"The AI alert's label (automatically set to a constant value by the system)","example":"ai_alert_metadata","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"createdBy":{"type":["string","null"],"description":"The email address of the user who created the alert rule that triggered this alert","example":"user@example.com","readOnly":true},"triggeredTimestamp":{"type":"string","description":"The triggered timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2025-09-01T00:00:00Z","readOnly":true},"resolvedTimestamp":{"type":["string","null"],"description":"The resolved timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2025-09-01T00:00:00Z","readOnly":true},"triggeredValue":{"type":"number","description":"The metric value that triggered the alert","example":125.5,"readOnly":true},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"anomaly":{"oneOf":[{"$ref":"#/components/schemas/AIAnomalyResource"},{"type":"null"}]},"resolved":{"type":"boolean","description":"Whether the alert has been resolved","example":false,"readOnly":true},"duration":{"type":["integer","null"],"format":"int64","description":"The alert duration in milliseconds","example":3600000,"readOnly":true},"groupDisplayName":{"type":["string","null"],"description":"The name of the group that triggered this alert (e.g., organization name, model name)","example":"Acme Corp","readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["triggeredValue"]},"EntityModelSkillUsageResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the skill (hash-encoded database ID)","example":"JMwX9g4","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"skill","readOnly":true},"name":{"type":"string","description":"Skill name as emitted by Claude Code","example":"code-review","readOnly":true},"originCategory":{"type":["string","null"],"description":"Derived provenance: VENDOR, ORGANIZATION, INDIVIDUAL, THIRD_PARTY, or UNKNOWN.","example":"VENDOR","readOnly":true},"source":{"type":["string","null"],"description":"Where the skill was loaded from (bundled/userSettings/projectSettings/plugin).","example":"bundled","readOnly":true},"kind":{"type":["string","null"],"description":"Skill kind when applicable.","example":"workflow","readOnly":true},"pluginName":{"type":["string","null"],"description":"Owning plugin name when plugin-provided.","example":"revenium-tools","readOnly":true},"marketplaceName":{"type":["string","null"],"description":"Marketplace the owning plugin was installed from, when plugin-provided.","example":"anthropics","readOnly":true},"totalCost":{"type":"number","description":"Total attributed cost over the window.","example":12.47,"readOnly":true},"callCount":{"type":"integer","format":"int64","description":"Number of cost-bearing requests attributed to this skill.","example":342,"readOnly":true},"traceCount":{"type":"integer","format":"int64","description":"Distinct traces the skill appeared in.","example":57,"readOnly":true},"firstSeen":{"type":["string","null"],"description":"First attributed request time in the window (ISO-8601).","example":"2026-06-01T12:00:00Z","readOnly":true},"lastSeen":{"type":["string","null"],"description":"Last attributed request time in the window (ISO-8601).","example":"2026-06-29T18:30:00Z","readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}}},"SkillUsagePagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"skillUsageResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelSkillUsageResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"SkillUsageResource_Read":{"type":"object","description":"A Claude Code skill with its aggregated usage (cost, calls) for a team","properties":{"id":{"type":"string","description":"Unique identifier for the skill (hash-encoded database ID)","example":"JMwX9g4","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"skill","readOnly":true},"name":{"type":"string","description":"Skill name as emitted by Claude Code","example":"code-review","readOnly":true},"originCategory":{"type":["string","null"],"description":"Derived provenance: VENDOR, ORGANIZATION, INDIVIDUAL, THIRD_PARTY, or UNKNOWN.","example":"VENDOR","readOnly":true},"source":{"type":["string","null"],"description":"Where the skill was loaded from (bundled/userSettings/projectSettings/plugin).","example":"bundled","readOnly":true},"kind":{"type":["string","null"],"description":"Skill kind when applicable.","example":"workflow","readOnly":true},"pluginName":{"type":["string","null"],"description":"Owning plugin name when plugin-provided.","example":"revenium-tools","readOnly":true},"marketplaceName":{"type":["string","null"],"description":"Marketplace the owning plugin was installed from, when plugin-provided.","example":"anthropics","readOnly":true},"totalCost":{"type":"number","description":"Total attributed cost over the window.","example":12.47,"readOnly":true},"callCount":{"type":"integer","format":"int64","description":"Number of cost-bearing requests attributed to this skill.","example":342,"readOnly":true},"traceCount":{"type":"integer","format":"int64","description":"Distinct traces the skill appeared in.","example":57,"readOnly":true},"firstSeen":{"type":["string","null"],"description":"First attributed request time in the window (ISO-8601).","example":"2026-06-01T12:00:00Z","readOnly":true},"lastSeen":{"type":["string","null"],"description":"Last attributed request time in the window (ISO-8601).","example":"2026-06-29T18:30:00Z","readOnly":true}}},"ChartDefinitionPagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"chartDefinitionResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelChartDefinitionResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"EntityModelChartDefinitionResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"chart_definition","readOnly":true},"label":{"type":"string","description":"The object's label","example":"Monthly Cost by Provider","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"User-defined chart name","example":"Monthly Cost by Provider"},"description":{"type":["string","null"],"description":"Chart description","example":"Track AI costs across different providers with monthly aggregation"},"configuration":{"$ref":"#/components/schemas/ChartConfigurationResource_Read","description":"Complete chart configuration"},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"teamId":{"type":"string","description":"The team identifier","writeOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["configuration"]},"BaseMetricDefinition":{"type":"object","description":"Base metric definition","properties":{"value":{"type":"string","description":"Metric value identifier","enum":["totalCost","requestCount","tokenCount","inputTokens","outputTokens","latency","errorCount","errorRate","imageCount","durationSeconds","characterCount","creditsConsumed"],"example":"totalCost"},"label":{"type":"string","description":"Display label","example":"Cost"},"description":{"type":["string","null"],"description":"Metric description","example":"Financial cost of AI operations"},"unit":{"type":"string","description":"Unit of measurement","enum":["currency","count","milliseconds","percentage"]},"supportedCalculations":{"type":"array","description":"Supported calculation types for this metric","items":{"type":"string","enum":["total","average","per-request","per-token","per-entity","median","maximum"]}},"requiresRevenue":{"type":"boolean","default":false,"description":"Whether this metric requires revenue data"}}},"CalculationTypeDefinition":{"type":"object","description":"Calculation type definition","properties":{"value":{"type":"string","description":"Calculation type identifier","enum":["total","average","per-request","per-token","per-entity","median","maximum"],"example":"total"},"label":{"type":"string","description":"Display label","example":"Total"},"description":{"type":["string","null"],"description":"Calculation description","example":"Sum of all values"},"requiresEntityType":{"type":"boolean","description":"Whether this calculation requires an entity type"}}},"ChartBuilderAvailableDataResource":{"type":"object","description":"Available chart builder data options","properties":{"baseMetrics":{"type":"array","description":"Available base metrics for charting","items":{"$ref":"#/components/schemas/BaseMetricDefinition"},"readOnly":true},"calculationTypes":{"type":"array","description":"Available calculation types","items":{"$ref":"#/components/schemas/CalculationTypeDefinition"},"readOnly":true},"entityTypes":{"type":"array","description":"Available entity types for grouping","items":{"$ref":"#/components/schemas/EntityTypeDefinition"},"readOnly":true},"groupByOptions":{"type":"array","description":"Available grouping options","items":{"$ref":"#/components/schemas/GroupByOptionDefinition"},"readOnly":true},"grainOptions":{"type":"array","description":"Available time granularity options","items":{"$ref":"#/components/schemas/GrainOptionDefinition"},"readOnly":true},"filterFields":{"type":"array","description":"Available fields for data preparation filters","items":{"$ref":"#/components/schemas/FilterFieldDefinition"},"readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}}},"EntityTypeDefinition":{"type":"object","description":"Entity type definition","properties":{"value":{"type":"string","description":"Entity type identifier","enum":["customer","agent","product","model","provider","task","subscriber"],"example":"provider"},"label":{"type":"string","description":"Display label","example":"Provider"},"description":{"type":["string","null"],"description":"Entity type description"}}},"FilterFieldDefinition":{"type":"object","description":"Filter field definition","properties":{"value":{"type":"string","description":"Field identifier","enum":["customer","model","provider","agent","product","task","subscriberEmail","totalCost","errorReason","isStreamed","operationType","environment"],"example":"provider"},"label":{"type":"string","description":"Display label","example":"Provider"},"type":{"type":"string","description":"Field data type","enum":["text","select","number","boolean"]},"operators":{"type":"array","description":"Supported filter operators for this field","items":{"type":"string","enum":["equals","not_equals","contains","not_contains","starts_with","in","not_in","is_null","is_not_null","greater_than","less_than","between"]}},"description":{"type":["string","null"],"description":"Field description"},"options":{"type":["array","null"],"description":"Available options for select-type fields","items":{"type":"string"}}}},"GrainOptionDefinition":{"type":"object","description":"Time grain option definition","properties":{"value":{"type":"string","description":"Grain identifier","enum":["auto","five_minute","hour","day","week","month"],"example":"day"},"label":{"type":"string","description":"Display label","example":"Daily"},"description":{"type":["string","null"],"description":"Grain description"}}},"GroupByOptionDefinition":{"type":"object","description":"Group by option definition","properties":{"value":{"type":"string","description":"Group by identifier","enum":["none","customer","model","provider","agent","product","task","subscriber","modality","org_unit"],"example":"provider"},"label":{"type":"string","description":"Display label","example":"Provider"},"description":{"type":["string","null"],"description":"Group by description"}}},"EntityModelRefundResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the refund","example":"3kTMd","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"refund","readOnly":true},"label":{"type":"string","description":"The refund's label (automatically derived from the amount and currency)","example":"Refund 100.00 USD","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp in ISO 8601 extended date-time format","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The last update timestamp in ISO 8601 extended date-time format","example":"2024-09-01T00:00:00Z","readOnly":true},"amount":{"type":"number","description":"The refund amount","example":100,"readOnly":true},"currency":{"type":"string","description":"The currency code of the refund amount","enum":["USD","EUR","CAD","GBP","JPY","CNY","MXN","COP","ARS","ZMW","AUD","ZWG"],"example":"USD","readOnly":true},"notes":{"type":["string","null"],"description":"Optional notes describing the reason for the refund","example":"Customer requested a refund","readOnly":true},"timestamp":{"type":["string","null"],"description":"The timestamp the refund was issued, in ISO 8601 extended date-time format","example":"2024-09-01T00:00:00Z","readOnly":true},"issuedDate":{"type":["string","null"],"description":"The date the refund was applied to an invoice, in ISO 8601 extended date-time format","example":"2024-09-30T23:59:59Z","readOnly":true},"product":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"invoice":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"asset":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"createdByUser":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"_links":{"$ref":"#/components/schemas/Links"}},"required":["amount","currency"]},"RefundPagedModel_Read":{"type":"object","description":"Paged model for Refunds","properties":{"_embedded":{"type":"object","properties":{"refundResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelRefundResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"RefundResource_Read":{"type":"object","description":"A refund applied to an invoice","properties":{"id":{"type":"string","description":"The unique identifier of the refund","example":"3kTMd","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"refund","readOnly":true},"label":{"type":"string","description":"The refund's label (automatically derived from the amount and currency)","example":"Refund 100.00 USD","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp in ISO 8601 extended date-time format","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The last update timestamp in ISO 8601 extended date-time format","example":"2024-09-01T00:00:00Z","readOnly":true},"amount":{"type":"number","description":"The refund amount","example":100,"readOnly":true},"currency":{"type":"string","description":"The currency code of the refund amount","enum":["USD","EUR","CAD","GBP","JPY","CNY","MXN","COP","ARS","ZMW","AUD","ZWG"],"example":"USD","readOnly":true},"notes":{"type":["string","null"],"description":"Optional notes describing the reason for the refund","example":"Customer requested a refund","readOnly":true},"timestamp":{"type":["string","null"],"description":"The timestamp the refund was issued, in ISO 8601 extended date-time format","example":"2024-09-01T00:00:00Z","readOnly":true},"issuedDate":{"type":["string","null"],"description":"The date the refund was applied to an invoice, in ISO 8601 extended date-time format","example":"2024-09-30T23:59:59Z","readOnly":true},"product":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"invoice":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"asset":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"createdByUser":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["amount","currency"]},"EntityModelProductResource":{"type":"object","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"product","readOnly":true},"label":{"type":"string","description":"The product's label (automatically set to the product name for display purposes)","example":"My Awesome Product","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this product","example":"a91XJp","writeOnly":true},"owner":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"ownerId":{"type":["string","null"],"description":"The unique identifier of the product owner","example":"LjRrbJ","writeOnly":true},"sourceConfiguration":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"sourceConfigurationId":{"type":["string","null"],"description":"The source configuration ID","example":"af75417c71d24e708f506596ce5ab675","writeOnly":true},"sources":{"type":["array","null"],"description":"The sources associated with the product","items":{"$ref":"#/components/schemas/ResourceMetadata"},"readOnly":true},"sourceIds":{"type":["array","null"],"description":"The source IDs associated with the product","example":["af75417c71d24e708f506596ce5ab675","bf86528d82e54f1a7df96ca7de747786"],"items":{"type":"string"},"writeOnly":true},"environment":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"environmentId":{"type":["string","null"],"description":"The environment id","example":"af75417c71d24e708f506596ce5ab675","writeOnly":true},"name":{"type":"string","description":"The name of the product","example":"my-awesome-product"},"version":{"type":"string","description":"The version of the product following semantic versioning (MAJOR.MINOR.PATCH). When creating a product, specify the initial version (e.g., '1.0.0'). When updating a product, the API automatically increments the version based on internal versioning rules. You can specify a version in the update request, but the API may override it","example":"1.0.0"},"externalLabel":{"type":["string","null"],"description":"An external label for the product that is exposed in developer portals","example":"An Awesome Product"},"plan":{"oneOf":[{"$ref":"#/components/schemas/Plan"},{"type":"null"}]},"portalLabel":{"type":["string","null"],"description":"An external label for the product that is exposed in developer portals","example":"Product Name"},"externalId":{"type":["string","null"],"description":"An external identifier (ie, in a api management system) that is associated with the Product","example":"12345abcd"},"portalId":{"type":["string","null"],"description":"An external id for the product that is exposed in developer portals","example":"Product Name"},"description":{"type":["string","null"],"description":"The description of the product","example":"Truly an awesome product"},"descriptionAsHTML":{"type":["string","null"],"description":"The description of the product (HTML formatted)","example":"<b>Truly an awesome product</b>"},"shortDescription":{"type":["string","null"],"description":"A short description of the product","example":"Truly an awesome product"},"shortDescriptionAsHTML":{"type":["string","null"],"description":"The short description of the product (HTML formatted)","example":"<b>Truly an awesome product</b>"},"published":{"type":["boolean","null"],"description":"Whether or not the product is published to a developer portal","example":true},"preview":{"type":["boolean","null"],"description":"Whether or not the product is in preview mode in a developer portal","example":false},"audienceRestriction":{"type":["string","null"],"description":"The audience restriction, if any, on a product","enum":["USER","ORGANIZATION"],"example":"USER"},"code":{"type":["string","null"],"description":"The product code","example":"dkfjsl-1234"},"notifyClientOnInvoice":{"type":["boolean","null"],"description":"Notify client when an invoice is generated for this product"},"notificationAddressesOnInvoice":{"type":["array","null"],"description":"A list of email addresses to notify when an invoice is generated for this product","example":["billing@example.com","finance@example.com"],"items":{"type":"string"}},"logo":{"type":["string","null"],"description":"The product's logo","readOnly":true},"logoByteArray":{"type":["string","null"],"format":"byte","description":"The product's logo as a byte array"},"apimGroupId":{"type":["string","null"],"description":"An external API group identifier (ie, in a API management system) that is associated with the Product","example":"apim-group-1234"},"pricingDescription":{"type":["string","null"],"description":"The pricing description","example":"Pay as you go pricing based on API calls"},"pricingDescriptionAsHTML":{"type":["string","null"],"description":"The pricing description (HTML formatted)","example":"<p>Pay as you go pricing based on <b>API calls</b></p>"},"tags":{"type":["array","null"],"description":"A list of tags associated with this product. Optional field - can be omitted entirely, provided as empty array [], or contain tag values","example":["tag1","tag2","tag3"],"items":{"type":"string"}},"terms":{"type":["array","null"],"description":"Terms and conditions associated with this product.","items":{"$ref":"#/components/schemas/Terms"}},"invoiceManagement":{"oneOf":[{"$ref":"#/components/schemas/InvoiceManagementResource"},{"type":"null"}]},"paymentSource":{"type":["string","null"],"description":"The product payment source","enum":["EXTERNAL_PAYMENT_NOTIFICATION","PAYMENT_VIA_PAYMENT_PROVIDER","INVOICE_ONLY_NO_PAYMENT"],"example":"PAYMENT_VIA_PAYMENT_PROVIDER"},"comingSoon":{"type":"boolean","description":"Whether to display the coming soon ribbon"},"comingSoonText":{"type":["string","null"],"description":"The text to display in the coming soon ribbon","example":"Coming Soon!"},"meteringModels":{"type":["array","null"],"description":"The metering models associated with the product. Optional field - can be omitted entirely, provided as empty array [], or contain model values","example":["TRANSACTIONAL"],"items":{"type":"string","enum":["TRANSACTIONAL","RESOURCE"]}},"notifyClientTrialAboutToExpire":{"type":["boolean","null"],"description":"Whether to notify the client when the trial is about to expire"},"paymentConfigurationId":{"type":["string","null"],"description":"The payment configuration ID associated with the product","example":"dka2dk2"},"tierQuotaNotificationThreshold":{"type":["number","null"],"format":"double","description":"The threshold Percentage for tier quota notifications","example":80},"displayPriority":{"type":["number","null"],"format":"double","description":"The displayPriority of the product","example":13},"apimConfigurationId":{"type":["string","null"],"description":"The Anypoint configuration ID associated with the product","example":"dka2dk2"},"performanceDefinition":{"oneOf":[{"$ref":"#/components/schemas/PerformanceDefinition"},{"type":"null"}]},"syncedToGateway":{"type":["boolean","null"],"description":"Whether or not the product is synchronized with an API Gateway","example":true,"readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["name","ownerId","plan","teamId","version"]},"ProductPagedModel":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"productResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelProductResource"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata"}}},"PeriodChargeResource":{"type":"object","description":"Period charge record representing aggregated usage and billing for a specific time period. Tracks metered API usage, subscription fees, and other charges that will be included on customer invoices","properties":{"id":{"type":"string","description":"The unique identifier of the period charge","example":"af75417c71d24e708f506596ce5ab675","readOnly":true},"resourceType":{"type":"string","description":"The resource type identifier for period charges","example":"period_charge","readOnly":true},"label":{"type":"string","description":"The display label for this period charge","example":"API Usage - September 2024","readOnly":true},"created":{"type":["string","null"],"description":"The timestamp when this period charge was created (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The timestamp when this period charge was last updated (ISO 8601 extended date-time format)","example":"2024-09-01T00:00:00Z","readOnly":true},"transactionId":{"type":["string","null"],"description":"The unique transaction identifier for this period charge","example":"123e4567-e89b-12d3-a456-426614174000","readOnly":true},"product":{"$ref":"#/components/schemas/ResourceMetadata","description":"Metadata of the product associated with this period charge","readOnly":true},"source":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"subscription":{"$ref":"#/components/schemas/ResourceMetadata","description":"Metadata of the subscription associated with this period charge","readOnly":true},"invoice":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"credential":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"tier":{"oneOf":[{"$ref":"#/components/schemas/Tier"},{"type":"null"}]},"planElement":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata"},{"type":"null"}]},"setupFee":{"oneOf":[{"$ref":"#/components/schemas/SetupFee"},{"type":"null"}]},"type":{"type":"string","description":"The transaction type category for this charge","enum":["TRANSACTIONAL","SUBSCRIPTION","ONETIME","SUBSCRIPTION_WITH_OVERAGE","NON_MONETIZED","INDIRECT","RESOURCE_USAGE"],"example":"TRANSACTIONAL","readOnly":true},"callCount":{"type":"integer","format":"int64","description":"The number of API calls or usage events aggregated into this period charge","example":100,"readOnly":true},"charge":{"type":"number","format":"double","description":"The monetary amount charged for this period in the specified currency","example":50,"readOnly":true},"currency":{"type":"string","description":"The currency code for this charge (ISO 4217 format)","enum":["USD","EUR","CAD","GBP","JPY","CNY","MXN","COP","ARS","ZMW","AUD","ZWG"],"example":"USD","readOnly":true},"settled":{"type":"boolean","description":"Indicates whether this period charge has been finalized and included on an invoice. Once settled, the charge cannot be modified","example":true,"readOnly":true},"settledAt":{"type":["string","null"],"description":"The timestamp when this period charge was settled and finalized (ISO 8601 extended date-time format)","example":"2024-09-02T00:00:00Z","readOnly":true},"expired":{"type":"boolean","description":"Indicates whether this period charge has expired and is no longer valid for billing","example":false,"readOnly":true},"remoteAddress":{"type":["string","null"],"description":"The IP address of the client that generated the API usage for this charge","example":"192.168.1.1","readOnly":true},"remoteUser":{"type":["string","null"],"description":"The identifier of the remote user or system that generated the API usage","example":"user@example.com","readOnly":true},"resource":{"type":["string","null"],"description":"The API resource path that was accessed during this period","example":"/api/v2/products","readOnly":true},"metadata":{"type":["string","null"],"description":"Additional metadata about this period charge as a JSON string. Contains custom fields and contextual information","example":{"region":"us-east-1","environment":"production"},"readOnly":true},"paymentProvider":{"type":["string","null"],"description":"The payment provider used for processing this charge","enum":["STRIPE"],"example":"STRIPE","readOnly":true},"unmodifiedCallCount":{"type":["integer","null"],"format":"int64","description":"The original call count before any adjustments or modifications were applied","example":100,"readOnly":true},"unmodifiedCharge":{"type":["number","null"],"format":"double","description":"The original charge amount before any adjustments, discounts, or modifications were applied","example":50,"readOnly":true},"trialInProgress":{"type":["boolean","null"],"description":"Indicates whether this charge occurred during an active trial period. Trial charges may be waived or handled differently","example":false,"readOnly":true},"chargeType":{"type":"string","description":"The specific type of charge classification","enum":["CHARGE_EXEMPT","SUBSCRIPTION_FLAT_RATE_CHARGE","SETUP_FEE_FLAT_RATE_CHARGE","ONETIME_FLAT_RATE_CHARGE","TIER_FLAT_RATE_CHARGE","ELEMENT_TRANSACTIONAL_CHARGE","TIER_CALL_COUNT_TRANSACTIONAL_CHARGE","CALL_COUNT_TRANSACTIONAL_CHARGE"],"example":"SUBSCRIPTION_FLAT_RATE_CHARGE","readOnly":true},"chargeDescription":{"type":["string","null"],"description":"A human-readable description of what this charge represents","example":"Monthly subscription fee","readOnly":true},"aggregatedElementValue":{"type":["number","null"],"format":"double","description":"The aggregated value of the metering element for this period. Represents the total measured usage","example":100,"readOnly":true},"_links":{"$ref":"#/components/schemas/Links","readOnly":true}},"required":["callCount","charge","chargeType","currency","expired","label","product","resourceType","settled","subscription","type"]},"UnassignedSubscriberResponse_Read":{"type":"object","description":"A subscriber (user) in the current organization whose email does not resolve to a directory person with an open primary org-unit membership","properties":{"userId":{"type":"integer","format":"int64","description":"User id","example":8842},"emailAddress":{"type":"string","description":"User email address (normalized)","example":"ash@weyland-yutani.io"},"personId":{"type":["integer","null"],"format":"int64","description":"Resolved DirectoryPerson id when the email is linked but the person has no open assignment; null when the email is not resolved to a person at all","example":97}}},"EntityModelMeteringElementDefinitionResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"The id of object","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"metering_element_definition","readOnly":true},"label":{"type":"string","description":"The metering element's label (automatically set to the element name for display purposes)","example":"country","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"name":{"type":"string","description":"The name of the metering element definition","example":"definition one"},"description":{"type":["string","null"],"description":"The description of the metering element definition","example":"description one"},"type":{"type":"string","description":"The type of the metering element definition","enum":["STRING","NUMBER"],"example":"NUMBER"},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The unique identifier of the team that owns this metering element definition","example":"a91XJp","writeOnly":true},"isSystem":{"type":"boolean","description":"Indicates whether this is a system-provided metering element that cannot be deleted","example":false,"readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["name","teamId","type"]},"MeteringElementDefinitionPagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"meteringElementDefinitionResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelMeteringElementDefinitionResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"EntityModelJobResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"Revenium generated ID (URL-safe encoded string)","example":"JMwX9g4","readOnly":true},"label":{"type":"string","description":"Display label (name or agenticJobId)","readOnly":true},"resourceType":{"type":"string","description":"The type of object (automatically set by the system)","example":"job","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format)","example":"2025-01-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format)","example":"2025-01-01T00:05:00Z","readOnly":true},"agenticJobId":{"type":"string","description":"Original telemetry job identifier","example":"loan-app-12345","readOnly":true},"name":{"type":["string","null"],"description":"Human-readable name for the job","example":"Process Loan Application #123","readOnly":true},"type":{"type":["string","null"],"description":"Job type category (normalized to lowercase)","example":"loan-processing","readOnly":true},"version":{"type":["string","null"],"description":"Job version for tracking evolution","example":"1.2.0","readOnly":true},"environment":{"type":["string","null"],"description":"Environment where the job executed (e.g., production, staging)","example":"production","readOnly":true},"source":{"type":"string","description":"How the job was created: TELEMETRY, UI, or API","enum":["TELEMETRY","UI","API"],"example":"TELEMETRY","readOnly":true},"executionStatus":{"type":["string","null"],"description":"Execution status of a completed job: SUCCESS, FAILED, or CANCELLED","enum":["SUCCESS","FAILED","CANCELLED"],"example":"SUCCESS","readOnly":true},"outcomeType":{"type":["string","null"],"description":"Business outcome type: CONVERTED, ESCALATED, DEFLECTED, UNSUCCESSFUL, or CUSTOM","enum":["CONVERTED","ESCALATED","DEFLECTED","UNSUCCESSFUL","CUSTOM"],"example":"CONVERTED","readOnly":true},"outcomeValue":{"type":["number","null"],"description":"Monetary value of the outcome","example":150,"readOnly":true},"outcomeCurrency":{"type":["string","null"],"description":"Currency for the outcome value (ISO 4217)","example":"USD","readOnly":true},"outcomeReportedAt":{"type":["string","null"],"description":"When the outcome was reported (ISO 8601 extended date-time format)","example":"2025-01-01T00:10:00Z","readOnly":true},"outcomeMetadata":{"type":["string","null"],"description":"Additional outcome metadata as JSON","example":{"notes":"Customer signed contract"},"readOnly":true},"outcomeReason":{"type":["string","null"],"description":"Human-readable explanation of the outcome — why the job failed or was cancelled. Null when no reason was supplied.","example":"Upstream Hermes agent timed out after 300s","readOnly":true},"hasOutcome":{"type":"boolean","description":"Whether the job has a reported outcome","example":true,"readOnly":true},"outcomeUpdateCount":{"type":"integer","format":"int32","description":"Number of updates beyond the initial outcome report","example":0,"readOnly":true},"outcomeUpdatedAt":{"type":["string","null"],"description":"When the outcome was last updated (ISO 8601). Null if never updated.","example":"2025-06-15T14:30:00Z","readOnly":true},"outcomeUpdatedBy":{"type":["string","null"],"description":"Who last updated the outcome. Null if never updated.","example":"crm-integration","readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["agenticJobId","hasOutcome","id","label","outcomeUpdateCount","resourceType","source"]},"JobPagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"jobResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelJobResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"JobTimelineEvent_Read":{"type":"object","description":"Individual transaction event within a job","properties":{"transactionId":{"type":"string","description":"Unique transaction identifier","readOnly":true},"timestamp":{"type":"string","description":"Transaction start time (ISO 8601)","example":"2026-03-05T10:00:00Z","readOnly":true},"agent":{"type":["string","null"],"description":"The agent that executed this transaction","example":"DocExtractor","readOnly":true},"model":{"type":"string","description":"The AI model used","example":"gpt-4","readOnly":true},"provider":{"type":"string","description":"The AI provider","example":"OpenAI","readOnly":true},"duration":{"type":"integer","format":"int64","description":"Duration of this transaction in milliseconds","example":5000,"readOnly":true},"cost":{"type":["number","null"],"description":"Cost of this transaction in USD","example":0.0024,"readOnly":true},"inputTokens":{"type":["integer","null"],"format":"int64","description":"Number of input tokens","example":500,"readOnly":true},"outputTokens":{"type":["integer","null"],"format":"int64","description":"Number of output tokens","example":200,"readOnly":true},"totalTokens":{"type":["integer","null"],"format":"int64","description":"Total number of tokens","example":700,"readOnly":true},"status":{"type":"string","description":"Transaction status: success or error","example":"success","readOnly":true}},"required":["duration","model","provider","status","timestamp","transactionId"]},"JobTimelineResource_Read":{"type":"object","description":"Job transactions for waterfall timeline visualization","properties":{"transactions":{"type":"array","description":"Ordered list of transactions within this job","items":{"$ref":"#/components/schemas/JobTimelineEvent_Read"},"readOnly":true},"totalCount":{"type":"integer","format":"int32","description":"Total number of transactions","example":3,"readOnly":true}},"required":["totalCount","transactions"]},"JobROIResource_Read":{"type":"object","description":"ROI metrics for a single job","properties":{"agenticJobId":{"type":"string","description":"Original telemetry job identifier","example":"loan-app-12345"},"agenticJobName":{"type":["string","null"],"description":"Human-readable name for the job","example":"Process Loan Application"},"agenticJobType":{"type":["string","null"],"description":"Job type category","example":"loan_processing"},"totalCost":{"type":"number","description":"Total AI cost for this job","example":2.5},"outcomeValue":{"type":["number","null"],"description":"Monetary value of the outcome","example":500},"outcomeCurrency":{"type":["string","null"],"description":"Currency for the outcome value (ISO 4217)","example":"USD"},"roi":{"type":["number","null"],"description":"Return on investment percentage: (outcomeValue - totalCost) / totalCost * 100","example":19900},"executionStatus":{"type":["string","null"],"description":"Execution status: SUCCESS, FAILED, or CANCELLED","enum":["SUCCESS","FAILED","CANCELLED"],"example":"SUCCESS"},"outcomeType":{"type":["string","null"],"description":"Business outcome type: CONVERTED, ESCALATED, DEFLECTED, UNSUCCESSFUL, or CUSTOM","enum":["CONVERTED","ESCALATED","DEFLECTED","UNSUCCESSFUL","CUSTOM"],"example":"CONVERTED"},"hasOutcome":{"type":"boolean","description":"Whether the job has a reported outcome (executionStatus is set)","example":true},"transactionCount":{"type":"integer","format":"int64","description":"Number of AI metric transactions for this job","example":15},"inputTokens":{"type":"integer","format":"int64","description":"Total input tokens consumed","example":5000},"outputTokens":{"type":"integer","format":"int64","description":"Total output tokens generated","example":3000},"totalTokens":{"type":"integer","format":"int64","description":"Total tokens (input + output)","example":8000}}},"JobOutcomeRevisionResource_Read":{"type":"object","description":"Outcome history entry for a job — one revision per report or update","properties":{"sequence":{"type":"integer","format":"int32","description":"Sequence number: 1 for the initial report, 2+ for each update","example":1,"readOnly":true},"executionStatus":{"type":"string","description":"Execution status at the time of this report or update","enum":["SUCCESS","FAILED","CANCELLED"],"example":"SUCCESS","readOnly":true},"outcomeType":{"type":["string","null"],"description":"Business outcome type at the time of this report or update","enum":["CONVERTED","ESCALATED","DEFLECTED","UNSUCCESSFUL","CUSTOM"],"example":"CONVERTED","readOnly":true},"outcomeValue":{"type":["number","null"],"description":"Monetary outcome value at the time of this report or update","example":150,"readOnly":true},"outcomeCurrency":{"type":["string","null"],"description":"Currency for the outcome value","example":"USD","readOnly":true},"outcomeMetadata":{"type":["string","null"],"description":"Additional outcome metadata as JSON","example":{"notes":"Customer signed contract"},"readOnly":true},"outcomeReason":{"type":["string","null"],"description":"Explanation of the job's outcome as of this revision — why it failed or was cancelled. Distinct from `reason`, which explains why this revision was recorded.","example":"Upstream Hermes agent timed out after 300s","readOnly":true},"reportedBy":{"type":["string","null"],"description":"Who reported or updated this outcome","example":"crm-integration","readOnly":true},"reportedAt":{"type":"string","description":"When this outcome was reported or updated (ISO 8601)","example":"2025-01-01T00:10:00Z","readOnly":true},"reason":{"type":["string","null"],"description":"Reason this revision was recorded. Null for the initial report (sequence=1). Distinct from `outcomeReason`, which explains the job's own failure.","example":"Hermes SDK reported a false CANCELLED due to a client-side timeout","readOnly":true}},"required":["executionStatus","reportedAt","sequence"]},"ConversionFunnelResource_Read":{"type":"object","description":"Conversion funnel data for the ROI Dashboard Overview tab","properties":{"totalJobs":{"type":"integer","format":"int64","description":"Total number of jobs","example":100},"successfulJobs":{"type":"integer","format":"int64","description":"Number of jobs with executionStatus = SUCCESS","example":85},"convertedJobs":{"type":"integer","format":"int64","description":"Number of jobs with outcomeType = CONVERTED","example":60},"deflectedJobs":{"type":"integer","format":"int64","description":"Number of jobs with outcomeType = DEFLECTED","example":20},"escalatedJobs":{"type":"integer","format":"int64","description":"Number of jobs with outcomeType = ESCALATED","example":3},"customJobs":{"type":"integer","format":"int64","description":"Number of jobs with outcomeType = CUSTOM","example":2},"successRate":{"type":"number","description":"Success rate (successfulJobs / totalJobs)","example":0.85},"conversionRate":{"type":"number","description":"Conversion rate (convertedJobs / successfulJobs)","example":0.71}}},"UnpaidTotalsResource_Read":{"type":"object","description":"Aggregate of unpaid (UNPAID + PARTIALLY_PAID) invoice totals for a team","properties":{"count":{"type":"integer","format":"int64","description":"Number of unpaid (UNPAID + PARTIALLY_PAID) active invoices owned by the team","example":42,"readOnly":true},"totalAmount":{"type":"number","description":"Total outstanding amount across unpaid + partially-paid invoices","example":12345.67,"readOnly":true}}},"PagedModel":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"objectList":{"type":"array","items":{}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata"}}},"AnalyticsPagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"objectList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelObject_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"totalCost":{"type":"number","description":"Total cost across all items in the specified period (organization-wide)","example":12450.75,"readOnly":true},"costByProvider":{"type":"object","additionalProperties":{"type":"number"},"description":"Total cost breakdown by AI provider","example":{"anthropic":8000.5,"openai":4450.25},"readOnly":true},"lastRefreshDate":{"type":["string","null"],"description":"Timestamp when cost data was last refreshed from providers","example":"2025-10-21T10:00:00Z","readOnly":true},"totalCreditsApplied":{"type":["number","null"],"description":"Total credits applied across all items in the specified period (organization-wide). Null when no credits data is available.","example":156.78,"readOnly":true},"creditsAppliedByProvider":{"type":"object","additionalProperties":{"type":"number"},"description":"Credits applied breakdown by AI provider. Empty when no credits data is available.","example":{"bedrock":8.91},"readOnly":true},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"EntityModelObject_Read":{"type":"object","properties":{"content":{},"_links":{"$ref":"#/components/schemas/Links"}}},"PageInfo_Read":{"type":"object","properties":{"size":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"number":{"type":"integer","format":"int32"}}},"UserCostRow_Read":{"type":"object","properties":{"userEmail":{"type":"string"},"inputTokens":{"type":"integer","format":"int64"},"outputTokens":{"type":"integer","format":"int64"},"cacheReadTokens":{"type":"integer","format":"int64"},"cacheWriteTokens":{"type":"integer","format":"int64"},"totalTokens":{"type":"integer","format":"int64"},"attributedInputCost":{"type":"number"},"attributedOutputCost":{"type":"number"},"attributedCacheReadCost":{"type":"number"},"attributedCacheWriteCost":{"type":"number"},"totalAttributedCost":{"type":"number"},"requestCount":{"type":"integer","format":"int64"},"sessionCount":{"type":"integer","format":"int64"},"prsMerged":{"type":["integer","null"],"format":"int32"},"costPerPr":{"type":["number","null"]},"githubLogin":{"type":["string","null"]},"mappingStatus":{"type":["string","null"]}}},"UserCostSummaryResponse_Read":{"type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/UserCostRow_Read"}},"totalAttributedCost":{"type":"number"},"unattributedCost":{"type":"number"},"unattributedPercentage":{"type":"number"},"productivityIntegrationEnabled":{"type":"boolean"},"totalPrsMerged":{"type":["integer","null"],"format":"int64"},"totalCostPerPr":{"type":["number","null"]},"page":{"$ref":"#/components/schemas/PageInfo_Read"}}},"UserCostDetailEntry_Read":{"type":"object","properties":{"metricDate":{"type":"string","format":"date"},"model":{"type":"string"},"workspaceId":{"type":"string"},"inputTokens":{"type":"integer","format":"int64"},"outputTokens":{"type":"integer","format":"int64"},"cacheReadTokens":{"type":"integer","format":"int64"},"cacheWriteTokens":{"type":"integer","format":"int64"},"totalTokens":{"type":"integer","format":"int64"},"attributedInputCost":{"type":"number"},"attributedOutputCost":{"type":"number"},"attributedCacheReadCost":{"type":"number"},"attributedCacheWriteCost":{"type":"number"},"totalAttributedCost":{"type":"number"},"requestCount":{"type":"integer","format":"int64"},"sessionCount":{"type":"integer","format":"int64"}}},"UserCostDetailResponse_Read":{"type":"object","properties":{"userEmail":{"type":"string"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/UserCostDetailEntry_Read"}}}},"VcsPrDailyMember_Read":{"type":"object","properties":{"platformLogin":{"type":"string"},"date":{"type":"string","format":"date"},"prsMerged":{"type":"integer","format":"int64"},"prsMergedWithCodingTool":{"type":"integer","format":"int64"},"mappedEmail":{"type":["string","null"]},"prsMergedByVendor":{"type":["object","null"],"additionalProperties":{"type":"integer","format":"int64"}}}},"VcsPrMember_Read":{"type":"object","properties":{"platformLogin":{"type":"string"},"prsMerged":{"type":"integer","format":"int64"},"prsMergedWithCodingTool":{"type":"integer","format":"int64"},"mappedEmail":{"type":["string","null"]},"prsMergedByVendor":{"type":["object","null"],"additionalProperties":{"type":"integer","format":"int64"}}}},"VcsPrsSummaryResponse_Read":{"type":"object","properties":{"source":{"type":"string"},"granularity":{"type":"string"},"members":{"type":["array","null"],"items":{"$ref":"#/components/schemas/VcsPrMember_Read"}},"dailyRows":{"type":["array","null"],"items":{"$ref":"#/components/schemas/VcsPrDailyMember_Read"}},"totalPrsMerged":{"type":"integer","format":"int64"},"totalPrsMergedWithCodingTool":{"type":"integer","format":"int64"},"totalPrsMergedByVendor":{"type":["object","null"],"additionalProperties":{"type":"integer","format":"int64"}}}},"ClaudeCodeContributionsSummaryResponse_Read":{"type":"object","properties":{"contributors":{"type":"array","items":{"$ref":"#/components/schemas/ClaudeCodeContributor_Read"}},"totalPullRequests":{"type":"integer","format":"int64"},"totalCommits":{"type":"integer","format":"int64"}}},"ClaudeCodeContributor_Read":{"type":"object","properties":{"userEmail":{"type":"string"},"sessions":{"type":"integer","format":"int64"},"commits":{"type":"integer","format":"int64"},"pullRequests":{"type":"integer","format":"int64"},"linesAdded":{"type":"integer","format":"int64"},"linesRemoved":{"type":"integer","format":"int64"}}},"RefreshAcceptedResponse":{"type":"object","description":"Response returned after a billing refresh request. Intraday returns 200 (completed), historical returns 202 (processing in background).","properties":{"message":{"type":"string","description":"Human-readable status message","example":"Intraday billing refresh completed successfully"},"refreshType":{"type":"string","description":"Type of refresh performed","enum":["intraday","historical"],"example":"intraday"},"teamId":{"type":"string","description":"Revenium team ID whose billing data is being refreshed","example":"jR2kmLs"}}},"CoverageRatioResponse_Read":{"type":"object","properties":{"state":{"type":"string","description":"Overall coverage state","enum":["VALID","NO_INTEGRATION","ZERO_SPEND_PERIOD","DATA_UNAVAILABLE"],"example":"VALID"},"aggregateRatio":{"type":["number","null"],"format":"double"},"aggregateRatioAvailable":{"type":["boolean","null"]},"hiddenSpend":{"type":["number","null"]},"trend":{"type":["number","null"],"format":"double"},"confidence":{"type":["string","null"]},"byProvider":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ProviderRatioItem_Read"}}}},"ProviderRatioItem_Read":{"type":"object","properties":{"provider":{"type":"string","description":"Provider name","example":"anthropic"},"state":{"type":"string","description":"Provider state: 'active' if billing data exists in period, 'no-data' otherwise","example":"active"},"ratio":{"type":["number","null"],"format":"double","description":"Ratio of this provider's billing cost to total billing (null if no billing data)","example":0.65},"metered":{"type":"number","description":"Metered cost for this provider in the period","example":12.5},"billing":{"type":"number","description":"Billing cost for this provider in the period","example":15}}},"ProviderChartPoint":{"type":"object","description":"A single data point in a provider chart series","properties":{"x":{"type":"string","description":"X value: a date bucket (time mode) or a category label (aggregate mode)"},"y":{"type":"number","description":"Y value for the selected metric"}}},"ProviderChartResource":{"type":"object","description":"Provider billing chart data for the Chart Builder and the providers dashboard","properties":{"metric":{"type":"string","example":"totalCost"},"dimension":{"type":"string","example":"provider"},"mode":{"type":"string","example":"time"},"grain":{"type":"string","example":"day"},"series":{"type":"array","items":{"$ref":"#/components/schemas/ProviderChartSeries"}}}},"ProviderChartSeries":{"type":"object","description":"A named series of provider chart points","properties":{"name":{"type":"string","description":"Series name: the dimension value, or 'Total' when ungrouped"},"points":{"type":"array","items":{"$ref":"#/components/schemas/ProviderChartPoint"}}}},"CompiledEnforcementRule":{"type":"object","properties":{"ruleId":{"type":"integer","format":"int64"},"teamId":{"type":"integer","format":"int64"},"name":{"type":"string"},"metricType":{"type":"string","enum":["TOTAL_COST","COST_PER_TRANSACTION","TOKENS_PER_MINUTE","TOKEN_COUNT","INPUT_TOKEN_COUNT","OUTPUT_TOKEN_COUNT","CACHED_TOKEN_COUNT","TOKENS_PER_REQUEST","TIME_TO_FIRST_TOKEN","DURATION","ERROR_COUNT","ERROR_RATE","REQUESTS_PER_MINUTE","IMAGE_COUNT","DURATION_SECONDS","CHARACTER_COUNT","CREDITS_CONSUMED","COST_PER_IMAGE","COST_PER_SECOND","VIDEO_COUNT","AUDIO_COUNT"]},"threshold":{"type":"number"},"currentValue":{"type":"number"},"periodType":{"type":"string","enum":["ONE_MINUTE","FIVE_MINUTES","FIFTEEN_MINUTES","THIRTY_MINUTES","ONE_HOUR","TWELVE_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","DAILY","WEEKLY","MONTHLY","QUARTERLY"]},"windowStart":{"type":"string","format":"date-time"},"windowEnd":{"type":"string","format":"date-time"},"percentUsed":{"type":["number","null"]},"breached":{"type":"boolean"},"groupBy":{"type":["string","null"],"enum":["ORGANIZATION","CREDENTIAL","PRODUCT","MODEL","PROVIDER","AGENT","SUBSCRIBER","TASK_TYPE","WORKSPACE","API_KEY"]},"filters":{"type":"array","items":{"$ref":"#/components/schemas/EnforcementFilterEntry"}},"compiledAt":{"type":"string","format":"date-time"},"shadowMode":{"type":"boolean"},"action":{"type":"string"},"warnThreshold":{"type":["number","null"],"description":"Soft warn-tier threshold. Populated only when the source CostControl carries both warnThreshold and hardLimit; null when only one tier is set, since the primary `threshold` field then carries it.","example":0.5,"readOnly":true},"warnBreached":{"type":"boolean","description":"True iff currentValue has crossed the warn tier. The evaluator emits a distinct level=WARN event when this is true and `breached` is false.","example":true,"readOnly":true},"warnPercentUsed":{"type":["number","null"],"description":"Utilization ratio computed against the warn tier (currentValue / warnThreshold). Distinct from `percentUsed`, which is computed against the primary (hard) `threshold`. Surfaced so a downstream WARN event can carry a self-consistent (threshold, currentValue, percentUsed) triple.","example":1.2,"readOnly":true},"windowKey":{"type":["string","null"],"description":"Stable identifier for the rule's current window (e.g., `MONTHLY:2026-05`). Used by the notification dedupe guard so one ongoing breach in the same window does not fan out repeated Slack/webhook dispatches.","example":"MONTHLY:2026-05","readOnly":true},"denyMessage":{"type":["string","null"],"description":"Customer-authored template shown to the AI agent when this rule blocks or warns on a request. Copied verbatim from CostControl.denyMessage — the server never interpolates it. The local budget-gate client renders the template variables `{model}`, `{spent}`, `{limit}`, `{window}`, `{percentUsed}`, `{ruleName}` before display. Null when the rule has no custom deny message configured.","example":"Blocked by {ruleName}: {spent} of {limit} used this {window}. Ask the user before retrying.","readOnly":true},"groupBreakdown":{"type":["array","null"],"description":"Per-group balances for subscriber-grouped rules, populated only on API reads (never part of the Redis snapshot the metering hot path parses). Null for pooled rules.","items":{"$ref":"#/components/schemas/EnforcementGroupEntry"},"readOnly":true}}},"EnforcementFilterEntry":{"type":"object","properties":{"dimension":{"type":"string"},"operator":{"type":"string"},"value":{"type":["string","null"]}}},"EnforcementGroupEntry":{"type":"object","properties":{"groupValue":{"type":"string","description":"Canonical group key: subscriber id, else email, else the unattributed sentinel."},"displayName":{"type":"string","description":"Human-readable group label; equals groupValue except for the unattributed bucket."},"currentValue":{"type":"number","description":"Spend accumulated by this group in the current window, in dollars."},"usagePercent":{"type":["number","null"],"description":"currentValue / threshold ratio, same convention as the rule-level percentUsed."},"breached":{"type":"boolean","description":"True when this group's balance has crossed the rule's primary threshold."}}},"EnforcementRulesPayload":{"type":"object","properties":{"rules":{"type":"array","items":{"$ref":"#/components/schemas/CompiledEnforcementRule"}},"compiledAt":{"type":"string","format":"date-time"}}},"BudgetProgressItemError":{"allOf":[{"$ref":"#/components/schemas/BudgetProgressItemResponse"},{"type":"object","properties":{"ok":{"type":"boolean","description":"Error indicator","example":false},"id":{"type":["string","null"],"description":"The alert ID that failed (may be null for validation errors)","example":"jR2kmLs"},"error":{"$ref":"#/components/schemas/ErrorDetail","description":"Error details"}}}],"description":"Failed budget progress item with error details"},"BudgetProgressItemResponse":{"type":"object","description":"Budget progress item response (success or error)","discriminator":{"propertyName":"ok"},"oneOf":[{"$ref":"#/components/schemas/BudgetProgressItemSuccess"},{"$ref":"#/components/schemas/BudgetProgressItemError"}],"properties":{"ok":{"type":"boolean"}}},"BudgetProgressItemSuccess":{"allOf":[{"$ref":"#/components/schemas/BudgetProgressItemResponse"},{"type":"object","properties":{"ok":{"type":"boolean","description":"Success indicator","example":true},"alertId":{"type":"string","description":"AI anomaly alert identifier (hashid)","example":"jR2kmLs"},"metricType":{"type":"string","description":"Metric type being tracked","enum":["TOTAL_COST","COST_PER_TRANSACTION","TOKENS_PER_MINUTE","TOKEN_COUNT","INPUT_TOKEN_COUNT","OUTPUT_TOKEN_COUNT","CACHED_TOKEN_COUNT","TOKENS_PER_REQUEST","TIME_TO_FIRST_TOKEN","DURATION","ERROR_COUNT","ERROR_RATE","REQUESTS_PER_MINUTE","IMAGE_COUNT","DURATION_SECONDS","CHARACTER_COUNT","CREDITS_CONSUMED","COST_PER_IMAGE","COST_PER_SECOND","VIDEO_COUNT","AUDIO_COUNT"],"example":"TOTAL_COST"},"cumulativePeriod":{"type":"string","description":"Cumulative tracking period","enum":["ONE_MINUTE","FIVE_MINUTES","FIFTEEN_MINUTES","THIRTY_MINUTES","ONE_HOUR","TWELVE_HOURS","TWENTY_FOUR_HOURS","SEVEN_DAYS","THIRTY_DAYS","DAILY","WEEKLY","MONTHLY","QUARTERLY"],"example":"MONTHLY"},"threshold":{"type":"number","description":"Budget threshold value","example":1000},"currentValue":{"type":"number","description":"Current cumulative value in the window","example":750.5},"remaining":{"type":["number","null"],"description":"Remaining budget (threshold - currentValue), null if threshold is zero","example":249.5},"percentUsed":{"type":["number","null"],"description":"Percentage of budget used (currentValue / threshold), null if threshold is zero","example":0.7505},"window":{"$ref":"#/components/schemas/BudgetWindowResource","description":"Budget window boundaries"},"aheadBehindVsLinear":{"$ref":"#/components/schemas/AheadBehindLinearResource","description":"Ahead/behind vs linear expectation"},"groups":{"type":["array","null"],"description":"Per-group budget progress results (only present for grouped alerts)","items":{"$ref":"#/components/schemas/BudgetGroupResult"}}}}],"description":"Successful budget progress item"},"BulkBudgetProgressResponse":{"type":"object","description":"Bulk budget progress response with per-item success or error","properties":{"items":{"type":"array","description":"List of budget progress items (success or error), preserving input order","items":{"$ref":"#/components/schemas/BudgetProgressItemResponse"}}}},"ErrorDetail":{"type":"object","description":"Error detail information","properties":{"code":{"type":"string","description":"Error code","enum":["NOT_FOUND","UNSUPPORTED_TYPE","VALIDATION_ERROR"],"example":"NOT_FOUND"},"type":{"type":"string","description":"Error type","enum":["NOT_FOUND","UNSUPPORTED_TYPE","VALIDATION_ERROR"],"example":"NOT_FOUND"},"message":{"type":"string","description":"Human-readable error message","example":"AI Anomaly with id jR2kmLs not found"}}},"AgentPagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"agentResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelAgentResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"EntityModelAgentResource_Read":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the agent","readOnly":true},"resourceType":{"type":"string","description":"The type of object","example":"agent","readOnly":true},"label":{"type":"string","description":"The agent's display name","readOnly":true},"created":{"type":["string","null"],"description":"The creation timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"updated":{"type":["string","null"],"description":"The updated timestamp (ISO 8601 extended date-time format, e.g., 2024-09-01T00:00:00Z)","example":"2024-09-01T00:00:00Z","readOnly":true},"telemetryKey":{"type":["string","null"],"description":"The exact string sent in the `agent` field of telemetry. Matched case-insensitively and unique per organization. Immutable after creation","example":"marketing-agent"},"displayName":{"type":["string","null"],"description":"Human-readable name for the agent. Defaults to the telemetry key when omitted","example":"Marketing Agent"},"source":{"type":["string","null"],"description":"How the agent record was created","enum":["TELEMETRY","UI","API"],"example":"API","readOnly":true},"owner":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"ownerId":{"type":["string","null"],"description":"The unique identifier of the user who owns this agent. Omit to leave the owner unchanged on update; a set owner cannot be cleared","example":"af75417c71d24e708f506596ce5ab675","writeOnly":true},"team":{"oneOf":[{"$ref":"#/components/schemas/ResourceMetadata_Read"},{"type":"null"}]},"teamId":{"type":["string","null"],"description":"The team identifier. Required when creating an agent. Immutable after creation","writeOnly":true},"_links":{"$ref":"#/components/schemas/Links"}},"required":["telemetryKey"]},"DiscoveredAgentPagedModel_Read":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"discoveredAgentResourceList":{"type":"array","items":{"$ref":"#/components/schemas/EntityModelDiscoveredAgentResource_Read"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata_Read"}}},"EntityModelDiscoveredAgentResource_Read":{"type":"object","properties":{"telemetryKey":{"type":"string","description":"Observed `agent` value (most frequent casing among case/whitespace variants)","example":"marketing-agent","readOnly":true},"metricCount":{"type":"integer","format":"int64","description":"Number of AI metrics observed for this agent in the requested period","example":1342,"readOnly":true},"totalCost":{"type":"number","description":"Total cost of AI metrics observed for this agent in the requested period","example":123.45,"readOnly":true},"firstSeen":{"type":["string","null"],"description":"Timestamp of the first metric observed in the requested period (ISO 8601)","example":"2024-09-01T00:00:00Z","readOnly":true},"lastSeen":{"type":["string","null"],"description":"Timestamp of the last metric observed in the requested period (ISO 8601)","example":"2024-09-30T00:00:00Z","readOnly":true},"registered":{"type":"boolean","description":"Whether an agent registry record exists for this telemetry value","example":false,"readOnly":true},"agentId":{"type":["string","null"],"description":"The registered agent's identifier, when registered","readOnly":true},"displayName":{"type":["string","null"],"description":"The registered agent's display name, when registered","readOnly":true},"source":{"type":["string","null"],"description":"How the registered agent record was created, when registered","enum":["TELEMETRY","UI","API"],"example":"TELEMETRY","readOnly":true},"ownerId":{"type":["string","null"],"description":"The registered agent's owner identifier, when registered and owned","readOnly":true},"_links":{"$ref":"#/components/schemas/Links"}}},"DeleteResponse_Read":{"type":"object","properties":{"id":{"type":"string"},"resourceType":{"type":"string"},"created":{"type":"string"},"updated":{"type":["string","null"]},"message":{"type":"string"},"_links":{"$ref":"#/components/schemas/Links"}}},"DeleteResponse":{"type":"object","properties":{"id":{"type":"string"},"resourceType":{"type":"string"},"created":{"type":"string"},"updated":{"type":["string","null"]},"message":{"type":"string"},"_links":{"$ref":"#/components/schemas/Links"}}},"EntityModelDeleteResponse":{"type":"object","properties":{"id":{"type":"string"},"resourceType":{"type":"string"},"created":{"type":"string"},"updated":{"type":["string","null"]},"message":{"type":"string"},"_links":{"$ref":"#/components/schemas/Links"}}},"BulkDeleteRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}}},"BulkDeleteResponse":{"type":"object","properties":{"deletedIds":{"type":"array","items":{"type":"string"}},"requestedCount":{"type":"integer","format":"int32"},"deletedCount":{"type":"integer","format":"int32"},"message":{"type":"string"}}},"BulkDeleteRequest_Read":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}}},"BulkDeleteResponse_Read":{"type":"object","properties":{"deletedIds":{"type":"array","items":{"type":"string"}},"requestedCount":{"type":"integer","format":"int32"},"deletedCount":{"type":"integer","format":"int32"},"message":{"type":"string"}}},"RateLimitErrorResponse":{"type":"object","description":"Envelope returned on 429 responses.","properties":{"error":{"type":"object","description":"Rate-limit error body.","properties":{"type":{"type":"string","enum":["rate_limit_error"]},"code":{"type":"string","enum":["rate_limit_exceeded"]},"message":{"type":"string"},"bucket":{"type":"string","enum":["metering","analytics","platform"]},"doc_url":{"type":"string","format":"uri"}},"required":["type","code","message","doc_url"]}},"required":["error"]},"Link":{"type":"object","properties":{"href":{"type":"string"},"hreflang":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"},"deprecation":{"type":"string"},"profile":{"type":"string"},"name":{"type":"string"},"templated":{"type":"boolean"}}},"Links":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Link"}}},"responses":{"RateLimitExceeded":{"description":"Rate limit exceeded. Retry after the indicated delay.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-Bucket":{"$ref":"#/components/headers/X-RateLimit-Bucket"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-RateLimit-Limited-Reason":{"$ref":"#/components/headers/X-RateLimit-Limited-Reason"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitErrorResponse"}}}}},"headers":{"X-RateLimit-Limit":{"description":"Requests permitted in the current window for the bucket that applied to this request.","schema":{"type":"integer","format":"int32"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window for this bucket. May be zero on the boundary request.","schema":{"type":"integer","format":"int32"}},"X-RateLimit-Reset":{"description":"Unix epoch seconds at which the current window resets and the counter returns to the bucket limit.","schema":{"type":"integer","format":"int32"}},"X-RateLimit-Bucket":{"description":"Which rate-limit bucket applied to this request.","schema":{"type":"string","enum":["metering","analytics","platform"]}},"Retry-After":{"description":"Integer seconds to wait before retrying after a 429.","schema":{"type":"integer","format":"int32"}},"X-RateLimit-Limited-Reason":{"description":"Reason the request was rate-limited.","schema":{"type":"string","enum":["bucket-rate","error-pattern"]}}},"securitySchemes":{"x-api-key":{"type":"apiKey","name":"x-api-key","in":"header"}}}}