---
title: "POST /#X-Amz-Target=AWSBilling.GetBillingPreferences"
method: POST
path: "/#X-Amz-Target=AWSBilling.GetBillingPreferences"
---

# POST /#X-Amz-Target=AWSBilling.GetBillingPreferences

`POST /#X-Amz-Target=AWSBilling.GetBillingPreferences`

Retrieves billing preferences for the specified feature. Each feature controls a distinct billing capability: which accounts can share Reserved Instances or credits, whether billing alerts are enabled, the historical record of sharing changes, and per-credit options.

## Headers

- `X-Amz-Target` 'AWSBilling.GetBillingPreferences', required

## Request body

- GetBillingPreferencesRequest
  - `nextToken` string — Pagination token from a previous response. Pass the value returned in <code>nextToken</code> to retrieve the next page of results.
  - `maxResults` integer — The maximum number of records to return per page. Range: 1 to 50. Default: 50.
  - `features` BillingFeature[], required — The feature to retrieve. Specify exactly one value. Valid values: <code>BILLING_ALERTS</code>, <code>RI_SHARING</code>, <code>RI_SHARING_HISTORY</code>, <code>CREDIT_SHARING</code>, <code>CREDIT_SHARING_HISTORY</code>, <code>CREDIT_LEVEL_SHARING</code>, <code>CREDIT_PREFERENCE_OPTIONS</code>.
  - `filters` BillingFeatureFilter[] — Filters to narrow results. Specify exactly one filter when supplied. The supported filter name is <code>PREFERENCE_KEY</code>, which accepts 1 to 10 values to match preference keys.
    - `name` 'PREFERENCE_KEY' — The filter name. Currently the only supported value is <code>PREFERENCE_KEY</code>.
    - `value` BillingFeatureFilterValue[] — The filter values to match. For <code>PREFERENCE_KEY</code>, supply 1 to 10 preference key values to match.

## Response `200`

Success

- GetBillingPreferencesResponse
  - `billingPreferences` BillingPreferenceSummary[], required — The list of preference entries matching the request.
    - `feature` 'RI_SHARING' | 'RI_SHARING_HISTORY' | 'CREDIT_SHARING' | 'CREDIT_SHARING_HISTORY' | 'CREDIT_LEVEL_SHARING' | 'BILLING_ALERTS' | 'CREDIT_PREFERENCE_OPTIONS', required — The feature this preference belongs to.
    - `key` string, required — The preference key. Format depends on the feature.
    - `value` 'ENABLED' | 'DISABLED', required — The preference value. Valid values: <code>ENABLED</code> or <code>DISABLED</code>.
    - `accountName` string — The display name of the account. Populated together with <code>accountId</code>; <code>null</code> otherwise.
    - `accountId` string — The associated Amazon Web Services account ID. Populated for account-list keys; <code>null</code> otherwise.
    - `billingPeriod` object — The billing period associated with the preference change. Populated only for the history features <code>RI_SHARING_HISTORY</code> and <code>CREDIT_SHARING_HISTORY</code>.
      - `year` integer, required — The four-digit year of the billing period.
      - `month` integer, required — The month of the billing period as an integer between 1 and 12.
  - `nextToken` string — Pagination token. Present when more pages are available; <code>null</code> when there are no more results.

## Other responses

- `480` — ThrottlingException
- `481` — AccessDeniedException
- `482` — ValidationException
- `483` — InternalServerException

---

[API](https://skmtc.net/aws/apis/billing.md) · [All operations](https://skmtc.net/aws/apis/billing/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/billing/versions/41b2ba3c3d6f/schema)
