## Retrieve organization spend alert

`admin.organization.spend_alerts.retrieve(alert_id) -> OrganizationSpendAlert`

**get** `/organization/spend_alerts/{alert_id}`

Retrieves an organization spend alert.

### Parameters

- `alert_id: String`

### Returns

- `class OrganizationSpendAlert`

  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.

    - `:USD`

  - `interval: :month`

    The time interval for evaluating spend against the threshold.

    - `:month`

  - `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.

      - `:email`

    - `subject_prefix: String`

      Optional subject prefix for alert emails.

  - `object: :"organization.spend_alert"`

    The object type, which is always `organization.spend_alert`.

    - `:"organization.spend_alert"`

  - `threshold_amount: Integer`

    The alert threshold amount, in cents.

### Example

```ruby
require "openai"

openai = OpenAI::Client.new(admin_api_key: "My Admin API Key")

organization_spend_alert = openai.admin.organization.spend_alerts.retrieve("alert_id")

puts(organization_spend_alert)
```

#### Response

```json
{
  "id": "id",
  "currency": "USD",
  "interval": "month",
  "notification_channel": {
    "recipients": [
      "string"
    ],
    "type": "email",
    "subject_prefix": "subject_prefix"
  },
  "object": "organization.spend_alert",
  "threshold_amount": 0
}
```
