Skip to main content
POST
Dismiss a usage request
List members’ requests for more usage, read one request, and decline a request that is still waiting. There is no webhook. Poll the list. To approve a request, raise that member’s plan or extra usage budget and pass usageRequestId on that write. See Billing Users. The calls use the workspace API key’s BILLING_API scope. The decline runs as the key’s service account owner.

Base URL

Dedicated deploymentsReplace api.langdock.com with <your-deployment-url>/api/public in all requests.

Prerequisites

  • API key with the BILLING_API scope
  • The key owner is a service account that has not been deleted and has an active Admin membership
  • USER_MANAGEMENT_API on the same key when you need email or name

Decline a request

POST /usage-requests/{requestId}/dismiss takes no body. The response is the request with status dismissed and resolution dismissed. A request that is no longer pending returns 409 with code USAGE_REQUEST_NOT_PENDING. The current status is in details.status. Nothing changes. A decline and a named plan or budget write for the same request cannot both succeed. The call that loses returns 409 and changes nothing.
Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on API Key Best Practices.

Authorizations

Authorization
string
header
required

API key as Bearer token. Format "Bearer YOUR_API_KEY"

Path Parameters

requestId
string<uuid>
required

Response

The dismissed request.

id
string<uuid>
required
userId
string<uuid>
required
status
enum<string>
required
Available options:
pending,
resolved,
dismissed
createdAt
string<date-time>
required
resolvedAt
string<date-time> | null
required
resolution
enum<string> | null
required

How the request was answered; null while pending.

Available options:
increased_limit,
upgraded_plan,
dismissed,
null
resolvedByUserId
string<uuid> | null
required

Admin or service account that answered the request.

email
string<email>

Present only when the key also has the USER_MANAGEMENT_API scope.

name
string | null

Present only when the key also has the USER_MANAGEMENT_API scope.