---
title: "Create a temporary grant request"
method: POST
path: "/api/v2/usage/temporary-grant-requests"
tags: ["Usage Metering"]
---

# Create a temporary grant request

`POST /api/v2/usage/temporary-grant-requests`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/usage/temporary-grant-requests`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `assistant_access`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `bits_dev_write`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `bits_investigations_write`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `bits_security_analyst_write`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `agent_builder_run`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `billing_edit`
- TypeScript: <https://skmtc.dev/datadog/apis/datadog-api-v2-collection/docs/api/v2/usage/temporary-grant-requests/post.ts> (a function with typed inputs; its response is checked against the schema)

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.

## Request body

- TemporaryGrantRequestCreateRequest: Create a request for the authenticated human user.
  - `data` TemporaryGrantRequestCreateData, required: The request resource to create. The server generates its ID.
    - `attributes` TemporaryGrantRequestCreateAttributes, required: Immutable terms and justification for a temporary grant request.
      - `expires_at` string, date-time, nullable: Exclusive expiry. Must be a future timestamp with a timezone. Date-only values are rejected. If omitted or null, defaults to the next UTC month boundary. Approval accepts this deadline unchanged.
      - `justification` string, required: Reason for requesting temporary credits. Trimmed and limited to 4096 UTF-8 bytes.
      - `total` integer, required: Target monthly AI credit limit in positive whole credits, not additional credits. Fractional credits are not accepted.
    - `type` 'temporary_grant_requests', required: The temporary grant request resource type.

## Response `201`

Created

- TemporaryGrantRequestResponse: A single temporary grant request.
  - `data` TemporaryGrantRequestData, required: A temporary grant request resource.
    - `attributes` TemporaryGrantRequestAttributes, required: Request history and the linked grant state. List and detail reads include grant_state for approved requests. Decision responses record the decision. Read the request for current grant state.
      - `created_at` string, date-time, required: When the request was submitted.
      - `decided_at` string, date-time: When the decision or cancellation was recorded.
      - `decided_by_user_id` string, uuid: UUID of the reviewer, or of the requester if the request was canceled.
      - `entity_key` string, required: The requester identity resolved by the server.
      - `expires_at` string, date-time, required: Immutable exclusive expiry, normalized to UTC microsecond precision.
      - `grant_state` 'active' | 'expired' | 'revoked' | 'replaced': Current state of the grant associated with an approved request. Replaced means a newer grant superseded this grant. The newer grant might no longer be active. This field is absent for requests that weren't approved.
      - `justification` string, required: Reason for requesting temporary credits. Trimmed and limited to 4096 UTF-8 bytes.
      - `quota_namespace` string, required: The quota namespace. Only AI credits are supported.
      - `requested_by_user_id` string, uuid, required: UUID of the authenticated requester.
      - `status` 'pending' | 'approved' | 'denied' | 'cancelled', required: The durable request decision, independent of whether its grant is still active.
      - `total` integer, required: Target monthly AI credit limit in positive whole credits, not additional credits. Fractional credits are not accepted.
    - `id` string, uuid, required: Server-generated request UUID.
    - `type` 'temporary_grant_requests', required: The temporary grant request resource type.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/3f70db624329?raw)
