Warrant API

Product licensing and feature entitlements for software you sell: define products, plans, and features; issue signed licenses; and gate features at runtime with offline-verifiable tokens (per-org Ed25519 signing).

Routing caveat at api.kapable.ai (IMP-1363)

Four warrant paths collide with other services on the canonical base and are routed elsewhere: /v1/me, /v1/orgs (root), /v1/orgs/{id}/public-key, and /v1/products (root list). Until the harbor↔warrant consolidation lands, call warrant via https://{org}.kapable.ai/warrant as the base URL for the full surface. Warrant-distinct paths (/v1/check, /v1/activate, /v1/validate, /v1/products/{id}/…, /v1/licenses/{id}/…, /v1/shop/…) work on either base.

Products, plans & features

MethodPathSDK (client.warrant)
GET/v1/productslistProducts
POST/v1/productscreateProduct
GET/v1/products/{id}getProduct
PATCH/v1/products/{id}updateProduct
DELETE/v1/products/{id}deleteProduct
GET/v1/products/{id}/featureslistFeatures
POST/v1/products/{id}/featurescreateFeature
GET/v1/products/{id}/planslistPlans
POST/v1/products/{id}/planscreatePlan

Licenses

MethodPathSDK (client.warrant)
GET/v1/products/{id}/licenseslistLicenses
POST/v1/products/{id}/licensesissueLicense
GET/v1/licenses/{id}getLicense
POST/v1/licenses/{id}/revokerevokeLicense
POST/v1/licenses/{id}/suspendsuspendLicense
POST/v1/licenses/{id}/reactivatereactivateLicense

Runtime checks (in your shipped product)

MethodPathSDK (client.warrant)
POST/v1/activateactivate
POST/v1/validatevalidate
POST/v1/checkcheck
GET/v1/shop/{org}/{product}shopInfo
POST/v1/shop/{org}/{product}/checkoutshopCheckout

SDK Examples

// Vendor side: define a product and issue a license
const product = await client.warrant.createProduct({
  name: 'My SaaS',
  slug: 'my-saas',
});
const license = await client.warrant.issueLicense('my-saas', {
  plan_slug: 'pro',
  customer_name: 'Acme Inc',
});

// Inside your shipped product: gate a feature with the signed token
const verdict = await client.warrant.check({
  signed_token: storedToken,
  feature: 'advanced-reports',
});
if (verdict.enabled) { /* unlock */ }
let verdict = client.warrant().check(&CheckRequest {
    signed_token: stored_token,
    feature: "advanced-reports".into(),
}).await?;