Managing licenses via the API
You can manage licenses programmatically via the Cashmere API, enabling you to retrieve, search, and update licenses for your collections.
All license API endpoints require Bearer token authentication. Include your API key in the
Authorizationheader of each request. You can receive yours in the Console
Overview
The License API allows publishers to:
- Retrieve specific licenses by ID
- Search for licenses by user email
- Update license approval status
- Manage which collections are included in a license
Important: You can only view and manage licenses that contain collections you own.
API Reference
Common Workflows
Approve a pending license request
- Find the license by user email:
GET /[email protected] - Update the status:
PUT /license/\{license_id\}/statuswithapproval_status: "Approved"
Add a collection to an existing license
- Get the current license:
GET /license/\{license_id\} - Extract the current
publisher_collectionsarray - Add the new collection ID to the array
- Update collections:
PUT /license/\{license_id\}/collectionswith the complete array
Supercharge your API usage
- Turn usage data into automated invoices - Pull token counts monthly with GET /license?limit=0, multiply by your MPT rate, and feed the results directly into Stripe or your billing system. This makes usage-based billing automatic instead of a manual copy-paste job.