{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/openai/main/json-schema/openai-project-spend-alert-schema.json", "title": "ProjectSpendAlert", "description": "Represents a spend alert configured at the project level.", "x-generated": "2026-09-23", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/openai-spend-alerts-api-openapi.yml#/components/schemas/ProjectSpendAlert", "type": "object", "properties": { "id": { "type": "string", "description": "The identifier, which can be referenced in API endpoints." }, "object": { "type": "string", "enum": [ "project.spend_alert" ], "description": "The object type, which is always `project.spend_alert`.", "x-stainless-const": true }, "threshold_amount": { "type": "integer", "description": "The alert threshold amount, in cents." }, "currency": { "type": "string", "enum": [ "USD" ], "description": "The currency for the threshold amount." }, "interval": { "type": "string", "enum": [ "month" ], "description": "The time interval for evaluating spend against the threshold." }, "notification_channel": { "$ref": "#/$defs/SpendAlertNotificationChannel" } }, "required": [ "id", "object", "threshold_amount", "currency", "interval", "notification_channel" ], "x-oaiMeta": { "name": "The project spend alert object" }, "$defs": { "SpendAlertNotificationChannel": { "type": "object", "description": "Email notification settings for a spend alert.", "properties": { "type": { "type": "string", "enum": [ "email" ], "description": "The notification channel type. Currently only `email` is supported.", "x-stainless-const": true }, "recipients": { "type": "array", "description": "Email addresses that receive the spend alert notification.", "items": { "type": "string" } }, "subject_prefix": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Optional subject prefix for alert emails." } }, "required": [ "type", "recipients" ] } } }