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 Authorization header 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

Omnipub API

Common Workflows

Approve a pending license request

  1. Find the license by user email: GET /[email protected]
  2. Update the status: PUT /license/\{license_id\}/status with approval_status: "Approved"

Add a collection to an existing license

  1. Get the current license: GET /license/\{license_id\}
  2. Extract the current publisher_collections array
  3. Add the new collection ID to the array
  4. Update collections: PUT /license/\{license_id\}/collections with the complete array

Supercharge your API usage

  1. 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.