Deposits credits onto the caller's OWN entitlement balance, authorized by their license-session token. Only honored for self-service entitlements (issued from a signup offer) — for tenant-provisioned customers, deposits remain an admin/machine operation.
const url = 'https://example.com/api/v1/provision/consumer/me/credits/grant';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"sessionId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","metric":"example","amount":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/provision/consumer/me/credits/grant \ --header 'Content-Type: application/json' \ --data '{ "sessionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "metric": "example", "amount": 1 }'Request Bodyrequired
Section titled “Request Bodyrequired”Session credit-grant commands.
Consumer-side credit grant: deposits onto the CALLER’s own entitlement balance, authorized by their license-session token. Only honored for self-service entitlements (issued from a signup offer) — the demo/top-up loop, not a general consumer credit-minting surface.
object
The caller’s own session id (must match the license token).
The balance-carrying metric to deposit onto (e.g. the product’s extra-credits metric).
Credits to add. Must be positive; the server clamps unreasonable amounts.
Examplegenerated
{ "sessionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "metric": "example", "amount": 1}Consumer-side credit grant: deposits onto the CALLER’s own entitlement balance, authorized by their license-session token. Only honored for self-service entitlements (issued from a signup offer) — the demo/top-up loop, not a general consumer credit-minting surface.
object
The caller’s own session id (must match the license token).
The balance-carrying metric to deposit onto (e.g. the product’s extra-credits metric).
Credits to add. Must be positive; the server clamps unreasonable amounts.
Examplegenerated
{ "sessionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "metric": "example", "amount": 1}Consumer-side credit grant: deposits onto the CALLER’s own entitlement balance, authorized by their license-session token. Only honored for self-service entitlements (issued from a signup offer) — the demo/top-up loop, not a general consumer credit-minting surface.
object
The caller’s own session id (must match the license token).
The balance-carrying metric to deposit onto (e.g. the product’s extra-credits metric).
Credits to add. Must be positive; the server clamps unreasonable amounts.
Examplegenerated
{ "sessionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "metric": "example", "amount": 1}Responses
Section titled “Responses”OK
Result of a session credit grant: the entitlement and metric affected and the amount actually deposited.
object
Result of a session credit grant: the entitlement and metric affected and the amount actually deposited.
object
Examplegenerated
{ "entitlementId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "metric": "example", "granted": 1}Result of a session credit grant: the entitlement and metric affected and the amount actually deposited.
object
Examplegenerated
{ "entitlementId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "metric": "example", "granted": 1}Bad Request
object
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Unauthorized
object
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Forbidden
object
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Not Found
object
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}