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.
If you're using Freemius for a WordPress product, please check out our official SDK.
Freemius API supports Bearer Token authentication for product-specific operations.
To retrieve your API token:
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.
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:
/products/{product_id}/payments.json
./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:
/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:
/developers/{developer_id}/products/{product_id}/plans/{plan_id}.json
/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.
https://api.freemius.com/v1/
https://docs.freemius.com/_mock/api/
https://api.freemius.com/v1/products/{product_id}/carts/{cart_id}/events.json
https://docs.freemius.com/_mock/api/products/{product_id}/carts/{cart_id}/events.json
curl -i -X GET \
'https://api.freemius.com/v1/products/1234/carts/1234/events.json?count=10&offset=10' \
-H 'Authorization: Bearer <YOUR_AccessToken_HERE>'
{ "events": [ { … } ] }
https://api.freemius.com/v1/products/{product_id}/carts/{cart_id}.json
https://docs.freemius.com/_mock/api/products/{product_id}/carts/{cart_id}.json
curl -i -X GET \
'https://api.freemius.com/v1/products/1234/carts/1234.json?enriched=false&fields=id%2Cname%2Cslug' \
-H 'Authorization: Bearer <YOUR_AccessToken_HERE>'
Cart details associated with the product.
The date and time the entity was created, under UTC timezone.
The date and time the entity was updated, under UTC timezone. If null
then the entity was never updated since its creation.
The status of the cart.
The mode the checkout app was opened in, when the cart was created. For example
dashboard
: The checkout was opened through our WordPress SDK.dialog
: The checkout was opened through our JavaScript SDK.page
: The checkout was opened directly.The payment method selected for the purchase.
The ID of the pricing associated with the entity.
The billing cycle of the subscription in number of months. 1 means monthly, 12 means annually, 0 means lifetime usually when subscriptions are created for lifetime trials.
The ID of the installation or site the entity is associated with, a null
value means it has not been associated with an installation yet.
The ID of the coupon associated with the entity.
The ISO 3166-1 alpha 2 two-letter country code associated with the entity.
The business VAT number (EU or UK territories) or other tax ID (for example Sales Tax ID for the US).
The ID of the user the entity belongs to. If NULL then still not associated to any user.
The environment the entity belongs to. 0 means it belongs to the production environment, 1 means it belongs to the sandbox environment.
Cart supports recovery campaign. If disabled, the recovery campaign will be stopped.
If set to true
, the cart recovery campaign will be non-functional and cannot be re-enabled. This happens if the prospect has clicked the "unsubscribe" link from any of the cart recovery emails.
The first time the prospect visited the checkout when the cart was being created.
Gross amount associated with the cart. (Only available when enriched
is set to true
.)
Coupon code associated with the cart. (Only available when enriched
is set to true
.)
{ "id": "123456", "created": "2025-01-01 00:00:00", "updated": "2025-01-01 00:00:00", "status": "pricing_visit", "mode": "dashboard", "payment_method": "cc", "plugin_id": "123456", "plan_id": "123456", "pricing_id": "123456", "is_trial": true, "billing_cycle": 1, "install_id": "123456", "coupon_id": "123456", "country_code": "us", "zip_postal_code": "92710", "vat_id": "GB12345678", "user_id": "123456", "email": "doe@example.com", "first": "John", "last": "Doe", "ip": "0.0.0.0", "url": "https://example.com/pricing", "environment": 0, "is_disabled": "false", "is_unsubscribed": "false", "visited": "2025-01-01 00:00:00", "completed": "2025-01-01 00:00:00", "price": "19.99", "gross": "359.64", "coupon_code": "BLACKFRIDAY2024", "licenses": "10" }
Retrieve the cart collection associated with your product.
If
enriched=true
you will get more details about the cart for example thegross
,coupon_code
andlicenses
fields.
You can use the
filter
orcount
parameters to get more refined results from your query. Please learn more about the individual parameters below.
You can use the filter
parameter to filter by status. If you don't provide a status, the endpoint will return all carts.
The number of records to skip before starting to return records. Default is 0.
Comma separated list of fields to return in the response. If not specified, all fields are returned.
https://api.freemius.com/v1/products/{product_id}/carts.json
https://docs.freemius.com/_mock/api/products/{product_id}/carts.json
curl -i -X GET \
'https://api.freemius.com/v1/products/1234/carts.json?count=50&email=doe%40example.com&enriched=false&fields=id%2Cname%2Cslug&filter=all&offset=10' \
-H 'Authorization: Bearer <YOUR_AccessToken_HERE>'
{ "carts": [ { … } ] }