Freemius API (1.0)

Welcome to the Freemius API Documentation!

You can use our API to access Freemius API endpoints, which can get information on various aspects of Freemius.

  • Manage products.
  • Manage license verifications.
  • Create custom integration with your SaaS.

If you're using Freemius for a WordPress product, please check out our official SDK.

Bearer Token Auth

Freemius API supports Bearer Token authentication for product-specific operations.

To retrieve your API token:

  1. Go to the Freemius Developer Dashboard.
  2. Open the Settings page of the relevant product.
  3. Click on the API Token tab.
  4. Copy the API Bearer Authorization Token from the UI.

Use this token by including it in the Authorization header of your API requests:

Authorization: Bearer {api_token}

Bearer tokens are scoped to a specific product. This means they can only be used with endpoints under the /products/{product_id}/ namespace. For example:

GET /products/12345/users.json
Authorization Bearer {api_token}

Requests to endpoints outside the product scope will result in an authorization error.

Other Scopes and Authentication

The Freemius API is organized around different scopes, based on the top-level entity of the operation:

For example, let's say you want to list all payments of a product. This operation can be done in several scopes:

  • Product Scope: /products/{product_id}/payments.json.
  • Developer Scope: /developers/{developer_id}/products/{product_id}/payments.json.

On the other hand, if a user would want to list their payment, then endpoint will be scoped to the user:

  • User Scope: /users/{user_id}/payments.json.

Some operations can be done from a particular scope only. For example only a developer can update a plan of a product or create a new plan. So the following operations will work:

  • Update Plan: POST /developers/{developer_id}/products/{product_id}/plans/{plan_id}.json
  • Create Plan: POST /developers/{developer_id}/products/{product_id}/plans.json

If you try to perform the same operation on a product scope, it will return an error. The scopes provides a way to control access and permissions for different entities in the Freemius ecosystem.

Currently, Bearer Token authentication is supported for product scope only. If you need access to endpoints in others scopes, use the secret-key based authentication with the following SDKs:

For most use cases, managing your products, licenses, and customers through the Developer Dashboard or Customer Portal provides all the necessary capabilities.

Download OpenAPI description
Languages
Servers
Production API

https://api.freemius.com/v1/

Local development API

http://api.freemius-local.com:8080/v1/

Mock server

https://docs.freemius.com/_mock/api/

Products

All operations which can be done on a product.

Operations

Developers

All operations which can be done from on a developer.

Operations

Subscriptions

All operations associated to a subscription.

Operations

Users

All operations which can be done on a user belonging to a store or a product.

Operations

Licenses

All operations which can be done on a license belonging to a store or a product.

Operations

List all subscriptions

Request

Retrieve the subscription collection associated with a license.

A license can have one active and multiple inactive subscriptions. Subscriptions are inactivated when a license is downgraded or upgraded or when the payment method is updated.

Path
product_idinteger(int64)>= 1required

The ID of the product.

Example: 1234
install_idinteger(int64)>= 1required

The ID of the install.

Example: 1234
license_idinteger(int64)>= 1required

The ID of the License.

Example: 1234
Query
countinteger[ 1 .. 50 ]

The number of records to return.

Default 25
Example: count=10
offsetinteger>= 0

The number of records to skip before starting to return records. Default is 0.

Default 0
Example: offset=10
fieldsstring

Comma separated list of fields to return in the response. If not specified, all fields are returned.

Example: fields=id,name,slug
curl -i -X GET \
  'https://api.freemius.com/v1/products/1234/installs/1234/licenses/1234/subscriptions.json?count=10&fields=id%2Cname%2Cslug&offset=10' \
  -H 'Authorization: Bearer <YOUR_AccessToken_HERE>'

Responses

Subscriptions collection.

Bodyapplication/json
subscriptionsArray of objects(Subscription)
Response
application/json
{ "subscriptions": [ {} ] }

Activate a license

Request

Activate a license and if needed, create an install with the given properties.

No Authorization header is required. If the provided license doesn't have an associated user, the endpoint will require the first_name, last_name, and user_email parameters to create a new user and associate it with the license.

Path
product_idinteger(int64)>= 1required

The ID of the product.

Example: 1234
Bodyapplication/jsonrequired
uidstring(uid)= 32 charactersrequired

Unique identifier of the caller. The UID must be same when pinging and when activating or deactivating a license. The generation of the UID is a responsibility of the client.

Example: "7W131pej6bJYV8WYM9KgGoBNB9bCiSrY"
license_keystringrequired

The license key. This is used for activating the license on the user's site.

Example: "sk_123FGqM456Pa786WtOp%^+67Y+;sXXz"
urlstring

Site's homepage URL.

titlestring

Site's title.

versionstring

Product's version.

is_marketing_allowedboolean or null

Whether or not the user has given their consent for marketing materials. A null value indicates that the user has not made a decision yet.

install_idinteger

Install ID when activating on an already existing install. If provided must belong to the same user as the license owner and must have the same UID. The new license will be activated for the install and existing one will be deactivated.

first_namestring

First name of the user (only needed when activating a ghost license).

last_namestring

Last name of the user (only needed when activating a ghost license).

user_emailstring

Email address of the user (only needed when activating a ghost license).

curl -i -X POST \
  https://api.freemius.com/v1/products/1234/licenses/activate.json \
  -H 'Content-Type: application/json' \
  -d '{
    "uid": "7W131pej6bJYV8WYM9KgGoBNB9bCiSrY",
    "license_key": "sk_123FGqM456Pa786WtOp%^+67Y+;sXXz"
  }'

Responses

License activated successfully.

Bodyapplication/json
user_idstring(int64)>= 1

The unique identifier of the entity.

Example: "123456"
user_secret_keystring

The secret key associated with the entity for authorization.

Example: "sk_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
user_public_keystring

The public key associated with the entity for authorization.

Example: "pk_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
plugin_idstring(int64)>= 1

The unique identifier of the entity.

Example: "123456"
license_plan_namestring(slug)

The name of the plan. Only lowercase characters allowed.

Example: "professional"
is_marketing_allowedboolean or null

Whether or not the user has given their consent for marketing materials. A null value indicates that the user has not made a decision yet.

install_idstring(int64)>= 1

The unique identifier of the entity.

Example: "123456"
install_secret_keystring

The secret key associated with the entity for authorization.

Example: "sk_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
install_public_keystring

The public key associated with the entity for authorization.

Example: "pk_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
install_api_tokenstring

The API access token with which authenticated requests can be made for this install entity. You need to set this token as the Bearer token in the Authorization header. For example:

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9

Example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
Response
application/json
{ "user_id": "123456", "user_secret_key": "sk_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6", "user_public_key": "pk_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6", "plugin_id": "123456", "license_plan_name": "professional", "is_marketing_allowed": true, "install_id": "123456", "install_secret_key": "sk_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6", "install_public_key": "pk_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6", "install_api_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9" }

Coupons

All operations which can be done on a coupon belonging to a store or a product.

Operations

Carts

All operations which can be done on a cart belonging to a store or a product.

Operations

Payments

All operations associated to a payment.

Operations

Installations

Operations related to the installation of a product.

Operations

Trials

Operations related to a trial license of a product.

Operations

Addons

Operations related to an addon of a product.

Operations

Plans

Operations related to plans, pricings and features of a product.

Operations

Events

Operations related to events of a store or product.

Operations

Reviews

Operations related to reviews of a product.

Operations

Deployments

Operations related to version deployments and retrieval.

Operations