Skip to content
Primary navigation

Spend Alerts

List organization spend alerts
client.Admin.Organization.SpendAlerts.List(ctx, query) (*ConversationCursorPage[OrganizationSpendAlert], error)
GET/organization/spend_alerts
Create organization spend alert
client.Admin.Organization.SpendAlerts.New(ctx, body) (*OrganizationSpendAlert, error)
POST/organization/spend_alerts
Retrieve organization spend alert
client.Admin.Organization.SpendAlerts.Get(ctx, alertID) (*OrganizationSpendAlert, error)
GET/organization/spend_alerts/{alert_id}
Update organization spend alert
client.Admin.Organization.SpendAlerts.Update(ctx, alertID, body) (*OrganizationSpendAlert, error)
POST/organization/spend_alerts/{alert_id}
Delete organization spend alert
client.Admin.Organization.SpendAlerts.Delete(ctx, alertID) (*OrganizationSpendAlertDeleted, error)
DELETE/organization/spend_alerts/{alert_id}
ModelsExpand Collapse
type OrganizationSpendAlert struct{…}

Represents a spend alert configured at the organization level.

ID string

The identifier, which can be referenced in API endpoints.

Currency OrganizationSpendAlertCurrency

The currency for the threshold amount.

Interval OrganizationSpendAlertInterval

The time interval for evaluating spend against the threshold.

NotificationChannel OrganizationSpendAlertNotificationChannel

Email notification settings for a spend alert.

Recipients []string

Email addresses that receive the spend alert notification.

Type Email

The notification channel type. Currently only email is supported.

SubjectPrefix stringOptional

Optional subject prefix for alert emails.

Object OrganizationSpendAlert

The object type, which is always organization.spend_alert.

ThresholdAmount int64

The alert threshold amount, in cents.

type OrganizationSpendAlertDeleted struct{…}

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 OrganizationSpendAlertDeleted

Always organization.spend_alert.deleted.