---
title: Get a usage quota
description: Returns a usage quota's current configuration by its opaque identifier.
breadcrumbs: Docs > API > Get a usage quota
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Get a usage quota

## v2 (latest)

{% alert level="warning" %}
**Note**: This endpoint is in Preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help.md).
{% /alert %}

| Datadog site      | API endpoint                                                                 |
| ----------------- | ---------------------------------------------------------------------------- |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/usage/quotas/{quota_namespace}/{id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/usage/quotas/{quota_namespace}/{id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/usage/quotas/{quota_namespace}/{id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/usage/quotas/{quota_namespace}/{id}      |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/usage/quotas/{quota_namespace}/{id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/usage/quotas/{quota_namespace}/{id} |
| uk1.datadoghq.com | GET https://api.uk1.datadoghq.com/api/v2/usage/quotas/{quota_namespace}/{id} |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/usage/quotas/{quota_namespace}/{id}      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/usage/quotas/{quota_namespace}/{id}  |

### Overview

Returns a usage quota's current configuration by its opaque identifier. Scheduled limits are returned separately until they take effect, after which they are returned as the current limit.

By default, you can retrieve quotas from your organization and authorized descendant organizations in the same data center. Set `include_descendants=false` to restrict access to your organization.

A quota remains readable after its associated user, role, or team is deleted. Requires `billing_read` or `billing_edit`.

This endpoint requires any of the following permissions:

- `billing_read`
- `billing_edit`

OAuth apps require one of the following authorization [scopes](https://docs.datadoghq.com/api/latest/scopes.md#usage-metering) to access this endpoint: `billing_read`, `billing_edit`.

### Arguments

#### Path Parameters

| Field                        | Type   | Description                                                                                                       |
| ---------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------- |
| quota_namespace [*required*] | string | The product-specific namespace whose usage quotas are being managed.                                              |
| id [*required*]              | string | The opaque quota identifier returned by a previous list or create request. Clients must pass this value verbatim. |

#### Query Strings

| Field               | Type    | Description                                                                                                                                                                                                                                               |
| ------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| include_descendants | boolean | Allow access to authorized descendant organizations in the same data center. When false, an identifier belonging to any other organization returns 403. Defaults to true for ID-based operations to preserve existing descendant access. Default: `true`. |

### Response

{% tabs %}
{% tab label="200" %}
OK

{% tabs %}
{% tab label="Model" %}
Response containing a usage quota.

| Parent field         | Field                      | Type    | Description                                                                                                                                                                                                                                                                                          |
| -------------------- | -------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                      | data [*required*]          | object  | A usage quota resource.                                                                                                                                                                                                                                                                              |
| data                 | attributes [*required*]    | object  | Attributes of a usage quota.                                                                                                                                                                                                                                                                         |
| attributes           | enforced [*required*]      | boolean | Whether usage above the limit is actively blocked instead of only tracked or alerted on.                                                                                                                                                                                                             |
| attributes           | org_public_id [*required*] | string  | The public ID of the organization that owns the quota.                                                                                                                                                                                                                                               |
| attributes           | pending_effective_from     | string  | The future UTC month when the scheduled limit takes effect, formatted as `YYYY-MM`, starting at 00:00 UTC on its first day. Present only together with `pending_usage_limit` and omitted when no change is scheduled.                                                                                |
| attributes           | pending_usage_limit        | double  | The usage limit scheduled for the organization-wide quota in the usage units defined by the quota namespace. A value of `0` is valid. At the start of the effective month, this value becomes `usage_limit` and both pending fields are omitted. Omitted when no change is scheduled.                |
| attributes           | scope                      | object  | A namespace-specific key and value identifying what the quota applies to within an organization. The object contains exactly one entry. A `user_handle` value of `"*"` identifies the default quota applied to users without a specific quota. This field is omitted for an organization-wide quota. |
| additionalProperties | <any-key>                  | string  |                                                                                                                                                                                                                                                                                                      |
| attributes           | usage_limit [*required*]   | double  | The quota limit in the usage units defined by the quota namespace. May be fractional for quotas configured before public writes required whole units.                                                                                                                                                |
| data                 | id [*required*]            | string  | An opaque usage quota identifier. Clients must pass this value back verbatim in update and delete requests and must not infer any structure from it.                                                                                                                                                 |
| data                 | type [*required*]          | enum    | The JSON:API resource type for a usage quota. Allowed enum values: `quotas`.                                                                                                                                                                                                                         |
{% /tab %}

{% tab label="Example" %}
```json
{
  "data": {
    "attributes": {
      "enforced": true,
      "org_public_id": "abcdef12345",
      "pending_effective_from": "2026-11",
      "pending_usage_limit": 50000,
      "scope": {
        "<any-key>": "jane@example.com"
      },
      "usage_limit": 100000
    },
    "id": "MTIzNB9haV9jcmVkaXRzH3VzZXJfaGFuZGxlOl9fQUxMX18",
    "type": "quotas"
  }
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="400" %}
Bad Request

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="403" %}
Forbidden

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="404" %}
Not Found

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="429" %}
Too many requests

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}
{% /tabs %}

### Code Example

{% tabs %}
{% tab label="Curl" %}
```bash
# Path parameters
export quota_namespace="ai_credits"
export id="MTIzNB9haV9jcmVkaXRzH3VzZXJfaGFuZGxlOl9fQUxMX18"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com" # Or us3.datadoghq.com, us5.datadoghq.com, datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com, ddog-gov.com, us2.ddog-gov.com
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v2/usage/quotas/${quota_namespace}/${id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
```
{% /tab %}
{% /tabs %}
