Skip to Content
Orbyte Labs

Create grant

POST
/v1/grants

Creates the customer when needed and issues a manual grant without collecting payment or calling Stripe. credits uses integer ledger units, where one credit is 1000000000 units. Credits can fund any deployed feature by default, including features added later. Set featureKeys to restrict access to specific features. Listed keys must be unique and belong to the active, ready deployment. An empty list grants no feature access. Optional expiresAt is a future Unix timestamp in milliseconds. Omitted expiry means no expiry. An idempotencyKey is required and scoped to this environment's manual grants. Repeating the same terms returns the original grant, including after expiry or catalog changes. Reusing a key with different terms returns 409. Feature order is ignored. Manual grants fund usage independently of subscriptions.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Environment API key or OAuth access token. OAuth requests select context with X-Orbyte-Environment or X-Orbyte-Organization when required by the operation.

Header Parameters

X-Orbyte-Environment?string

Required for environment-scoped OAuth operations. API keys remain bound to their own environment.

Length1 <= length

Request Body

application/json
  1. body
identity*string
Length1 <= length <= 128
credits*string
Match^-?(0|[1-9][0-9]*)$
Lengthlength <= 20
featureKeys?array<>
Itemsitems <= 500
expiresAt?integer
Range0 < value <= 9007199254740991
idempotencyKey*string
Length1 <= length <= 128

Response Body

Created grant ID, including idempotent replays

response?stringapplication/json
Example Request
curl -X POST 'https://api.orbytelabs.com/v1/grants' \  -H 'Content-Type: application/json' \  -d '{  "identity": "string",  "credits": "string",  "idempotencyKey": "string"}'
Example Response
"string"