Skip to content
Primary navigation

Spend Alerts

List organization spend alerts
admin.organization.spend_alerts.list(**kwargs) -> ConversationCursorPage<OrganizationSpendAlert { id, currency, interval, 3 more } >
GET/organization/spend_alerts
Create organization spend alert
admin.organization.spend_alerts.create(**kwargs) -> OrganizationSpendAlert { id, currency, interval, 3 more }
POST/organization/spend_alerts
Retrieve organization spend alert
admin.organization.spend_alerts.retrieve(alert_id) -> OrganizationSpendAlert { id, currency, interval, 3 more }
GET/organization/spend_alerts/{alert_id}
Update organization spend alert
admin.organization.spend_alerts.update(alert_id, **kwargs) -> OrganizationSpendAlert { id, currency, interval, 3 more }
POST/organization/spend_alerts/{alert_id}
Delete organization spend alert
admin.organization.spend_alerts.delete(alert_id) -> OrganizationSpendAlertDeleted { id, deleted, object }
DELETE/organization/spend_alerts/{alert_id}
ModelsExpand Collapse
class OrganizationSpendAlert { id, currency, interval, 3 more }

Represents a spend alert configured at the organization level.

id: String

The identifier, which can be referenced in API endpoints.

currency: :USD

The currency for the threshold amount.

interval: :month

The time interval for evaluating spend against the threshold.

notification_channel: NotificationChannel{ recipients, type, subject_prefix}

Email notification settings for a spend alert.

recipients: Array[String]

Email addresses that receive the spend alert notification.

type: :email

The notification channel type. Currently only email is supported.

subject_prefix: String

Optional subject prefix for alert emails.

object: :"organization.spend_alert"

The object type, which is always organization.spend_alert.

threshold_amount: Integer

The alert threshold amount, in cents.

class OrganizationSpendAlertDeleted { id, deleted, object }

Confirmation payload returned after deleting an organization spend alert.

id: String

The deleted spend alert ID.

deleted: bool

Whether the spend alert was deleted.

object: :"organization.spend_alert.deleted"

Always organization.spend_alert.deleted.