Grant (or idempotently re-grant) a quota entitlement.
`idempotency_key` is derived as `internal:{source_id}` so a replayed grant converges on the same row (matching the `UNIQUE(realm_id, user_id, bucket_id, credit_type, idempotency_key)` constraint).
idempotency_key is derived as internal:{source_id} so a replayed grant
converges on the same row (matching the UNIQUE(realm_id, user_id, bucket_id, credit_type, idempotency_key) constraint).
Path Parameters
Realm ID
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
uuidsubscription_credit or free_periodic_credit (only those two feed the
dashboard window view). Defaults to subscription_credit.
RFC3339 timestamp; omit/leave null for an entitlement that never expires.
Stable anchor identifying this grant. Revoke targets the same value, so
callers use a fixed source_id across the grant/revoke pair to obtain a
clean baseline between tests.
Defaults to subscription_initial.
uuidResponse Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/internal/points/string/quota-entitlement/grant" \ -H "Content-Type: application/json" \ -d '{ "bucketId": "1980377d-7926-47e0-9e64-a9d0c746404d", "sourceId": "string", "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b", "windows": [ { "key": "string", "limit": 0, "windowSeconds": 0 } ] }'{ "entitlementId": "79a605b5-f302-4c5d-bbc7-cbd58f1a9b0d", "status": "string"}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}