For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/api/latest/usage-metering/create-a-temporary-grant-request.md. A documentation index is available at /llms.txt.
Language
Datadog site

Create a temporary grant request

WARNINGNote: This endpoint is in preview and is subject to change. If you have any feedback, contact Datadog support.
POSThttps://api.datadoghq.com/api/v2/usage/temporary-grant-requestshttps://api.us3.datadoghq.com/api/v2/usage/temporary-grant-requestshttps://api.us5.datadoghq.com/api/v2/usage/temporary-grant-requestshttps://api.datadoghq.eu/api/v2/usage/temporary-grant-requestshttps://api.ap1.datadoghq.com/api/v2/usage/temporary-grant-requestshttps://api.ap2.datadoghq.com/api/v2/usage/temporary-grant-requestshttps://api.uk1.datadoghq.com/api/v2/usage/temporary-grant-requestshttps://api.ddog-gov.com/api/v2/usage/temporary-grant-requestshttps://api.us2.ddog-gov.com/api/v2/usage/temporary-grant-requests

Overview

Request a temporary increase to your monthly AI credit limit. Set total to the new monthly limit you need, in whole credits, not the number of credits to add. Include a justification and, optionally, an expiry. If you omit the expiry, the grant ends at the next UTC month boundary. A user with the Billing Edit permission approves or denies the request. Requires an authenticated human user. Service-account credentials are unsupported.

This endpoint requires any of the following permissions:

  • assistant_access
  • bits_dev_write
  • bits_investigations_write
  • bits_security_analyst_write
  • agent_builder_run
  • billing_edit

OAuth apps require one of the following authorization scopes to access this endpoint: assistant_access, bits_dev_write, bits_investigations_write, bits_security_analyst_write, agent_builder_run, billing_edit.

Request

Body Data (required)

Field
Type
Description
data [required]
object

The request resource to create. The server generates its ID.

Response

Created

A single temporary grant request.

Field
Type
Description
data [required]
object

A temporary grant request resource.

Code Example

Create a temporary grant request
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/usage/temporary-grant-requests" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "expires_at": "2028-03-01T00:00:00Z",
      "justification": "Credits needed to finish the incident investigation.",
      "total": 200
    },
    "type": "temporary_grant_requests"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/usage/temporary-grant-requests" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "expires_at": "2028-03-01T00:00:00Z",
      "justification": "Credits needed to finish the incident investigation.",
      "total": 200
    },
    "type": "temporary_grant_requests"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/usage/temporary-grant-requests" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "expires_at": "2028-03-01T00:00:00Z",
      "justification": "Credits needed to finish the incident investigation.",
      "total": 200
    },
    "type": "temporary_grant_requests"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/usage/temporary-grant-requests" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "expires_at": "2028-03-01T00:00:00Z",
      "justification": "Credits needed to finish the incident investigation.",
      "total": 200
    },
    "type": "temporary_grant_requests"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/usage/temporary-grant-requests" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "expires_at": "2028-03-01T00:00:00Z",
      "justification": "Credits needed to finish the incident investigation.",
      "total": 200
    },
    "type": "temporary_grant_requests"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/usage/temporary-grant-requests" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "expires_at": "2028-03-01T00:00:00Z",
      "justification": "Credits needed to finish the incident investigation.",
      "total": 200
    },
    "type": "temporary_grant_requests"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/usage/temporary-grant-requests" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "expires_at": "2028-03-01T00:00:00Z",
      "justification": "Credits needed to finish the incident investigation.",
      "total": 200
    },
    "type": "temporary_grant_requests"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="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 POST "https://api.${DD_SITE}/api/v2/usage/temporary-grant-requests" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "expires_at": "2028-03-01T00:00:00Z",
      "justification": "Credits needed to finish the incident investigation.",
      "total": 200
    },
    "type": "temporary_grant_requests"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="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 POST "https://api.${DD_SITE}/api/v2/usage/temporary-grant-requests" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "expires_at": "2028-03-01T00:00:00Z",
      "justification": "Credits needed to finish the incident investigation.",
      "total": 200
    },
    "type": "temporary_grant_requests"
  }
}
EOF