Create grant
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.
bearerAuthAuthorizationBearer <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.
X-Orbyte-Environment?stringRequired for environment-scoped OAuth operations. API keys remain bound to their own environment.
1 <= lengthapplication/json- body
identity*string1 <= length <= 128credits*string^-?(0|[1-9][0-9]*)$length <= 20featureKeys?array<>items <= 500expiresAt?integer0 < value <= 9007199254740991idempotencyKey*string1 <= length <= 128Created grant ID, including idempotent replays
response?stringapplication/jsoncurl -X POST 'https://api.orbytelabs.com/v1/grants' \ -H 'Content-Type: application/json' \ -d '{ "identity": "string", "credits": "string", "idempotencyKey": "string"}'"string"