Skip to main content
POST
Grant credits

Authorizations

Authorization
string
header
required

API key authentication

Path Parameters

id
string
required
Pattern: ^crp_[a-zA-Z0-9]+$

Body

application/json
amount
number
required

Credits to allocate (in the pool's pricing unit).

Required range: x <= 1000000000
priority
integer

Drawdown priority (lower = consumed first). Defaults to 0.

effectiveAt
string<date-time>

When the block becomes active. Defaults to now (or the customer's active-subscription test-clock time).

recurrencePeriod
string

ISO-8601 duration (e.g. P1M). When set, amount is re-added each interval within the block's envelope.

recurrenceAnchor
string<date-time>

Recurrence phase anchor. Defaults to effectiveAt. Only valid with recurrencePeriod.

expiresAt
string<date-time>

When the block expires (per-block expiry).

idempotencyKey
string

Idempotency key; a repeat with the same key returns the existing grant.

Maximum string length: 255

Response

Credits allocated

id
string
required

The grant's id (grt_…).

Pattern: ^grt_[a-zA-Z0-9]+$
object
enum<string>
default:grant
required
Available options:
grant
creditPoolId
string
required
Pattern: ^crp_[a-zA-Z0-9]+$
amount
number
required

Credits allocated in this block.

priority
integer
required

Drawdown priority (lower = consumed first). Defaults to 0.

recurrencePeriod
string | null
required

ISO-8601 recurrence duration, or null for a one-off block.

recurrenceAnchor
string<date-time> | null
required

Recurrence phase anchor, or null for a one-off block.

effectiveAt
string<date-time>
required
expiresAt
string<date-time> | null
required
createdAt
string<date-time>
required
voidedAt
string<date-time> | null
required

When this allocation was voided, or null if it is still live. A voided allocation no longer contributes to the pool's balance.