Delete organization spend alert
client.Admin.Organization.SpendAlerts.Delete(ctx, alertID) (*OrganizationSpendAlertDeleted, error)
DELETE/organization/spend_alerts/{alert_id}
Delete organization spend alert
package main
import (
"context"
"fmt"
"github.com/openai/openai-go"
"github.com/openai/openai-go/option"
)
func main() {
client := openai.NewClient(
option.WithAdminAPIKey("My Admin API Key"),
)
organizationSpendAlertDeleted, err := client.Admin.Organization.SpendAlerts.Delete(context.TODO(), "alert_id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", organizationSpendAlertDeleted.ID)
}
{
"id": "alert_abc123",
"object": "organization.spend_alert.deleted",
"deleted": true
}
Returns Examples
{
"id": "alert_abc123",
"object": "organization.spend_alert.deleted",
"deleted": true
}