Skip to content

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.

POST
/api/v1/provision/consumer/me/credits/grant
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 }'

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
sessionId

The caller’s own session id (must match the license token).

string format: uuid
metric

The balance-carrying metric to deposit onto (e.g. the product’s extra-credits metric).

string
amount

Credits to add. Must be positive; the server clamps unreasonable amounts.

number | string format: double
/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/
Examplegenerated
{
"sessionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"metric": "example",
"amount": 1
}

OK

Result of a session credit grant: the entitlement and metric affected and the amount actually deposited.

object
entitlementId
string format: uuid
metric
string
granted
number | string format: double
/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/

Bad Request

object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string

Unauthorized

object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string

Forbidden

object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string

Not Found

object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string