Create a license
POSThttps://api.freemius.com/v1/products/{product_id}/plans/{plan_id}/pricing/{pricing_id}/licenses.json
Auth:Bearer TokenSCOPE: PRODUCT
Product-scoped API tokens allow you to operate on the product itself. This token usually allows read-only access to the product configuration and write access to several operations on subscriptions, customers, payments, and more. For most SaaS or app integrations, this is the token you will need.
- Go to the Freemius Developer Dashboard.
- Open the Settings page of the relevant product.
- Click the API & Keys tab.
- Copy the API Bearer Authorization Token from the UI.
Create a new license for the plan and pricing. Please note that:
- Either
periodorexpires_atoris_block_featuresmust be set. - If you create a license with
is_block_featuresset tofalseand do not specifyperiodandexpires_at, the license will never expire or block features and will continue to work for lifetime. - If you specify an email address, the user must have already activated a license or installed your product before. If your user has not activated a license, then please don't use the field and when they activate the license we will collect their email and register the user with Freemius.
- Use the
sourceparameter only when creating migrated licenses from a legacy system.
More information about every other parameters can be found below.
Request
Path Parameters
Bodyrequired
0- Freemius1- Other2- Easy Digital Downloads (EDD)3- WooCommerce (WC)4- Rating Widget5- Gumroad6- CodeCanyon7- ThemeForest8- AppSumo9- SendOwl10- WHMCS11- Lemon Squeezy
Guide the Freemius WP SDK when the product should be running in a white-label mode.
The source of the migration data. To get support migrating from other platform please see our documentation.
Responses
- 200
The license created successfully.
Schema
license object
A license represents authorization to use available features of the product.
Guide the Freemius WP SDK when the product should be running in a white-label mode.
The source of the migration data. To get support migrating from other platform please see our documentation.
0- Freemius1- Other2- Easy Digital Downloads (EDD)3- WooCommerce (WC)4- Rating Widget5- Gumroad6- CodeCanyon7- ThemeForest8- AppSumo9- SendOwl10- WHMCS11- Lemon Squeezy