Bonzai Pro API

Welcome to the documentation for the Bonzai API, the programming interface for our content creator-focused platform.

Notice: API in Beta Version

Please be aware that the Bonzai API is currently in its beta version. We welcome your feedback and suggestions to improve its functionality and user experience. For any comments or useful remarks, feel free to reach out to us at contact@bonzai.lol. Your input is invaluable in helping us refine and enhance the API.

API access

Access to the Bonzai API is exclusively reserved for Bonzai Pro members.

Authentication System

The Bonzai API utilizes a bearer token authentication system to ensure secure access to its services. The token must be included in the Authorization header of every request made to the API.

Obtaining Your Token

To obtain your API token, simply visit: https://www.bonzai.lol/user/profile and then navigate to "Manage API Tokens".


Product Invitation

This route enables Pro members to grant their customers access to products without needing to go through the Bonzai checkout process.

Pro members can activate products seamlessly for promotional offers or when using external checkout systems, diversifying sales and marketing strategies beyond the Bonzai checkout process.

Grant access to a product

POST https://www.bonzai.lol/api/v1/products/{product_uuid}/invite

This function grants access to a product by requiring an email. If the email matches a Bonzai user, it grants direct access. Otherwise, it sends an email invitation with a one-click link to create and activate the account.

You can find the product_uuid in any product-related URL: http://www.bonzai.test/products/xBgq3Z3J

Path Parameters

Request Body

Understanding code parameter

The code parameter plays a crucial role in managing access to your products. This parameter empowers you to grant or revoke access efficiently.

Granting Access

When you use the Bonzai API to grant access to a product, you can include the code parameter. This allows you to assign a code to the granted access, ensuring precise control.

Revoking Access

Conversely, when you need to revoke access to a product, you can provide the associated code parameter. This action removes access not only for the individual who initiated it but for all individuals who share the same code.

Two Usage Scenarios

  1. Individualized Codes: You have the option to assign a distinct code to each individual, enabling personalized access control, such as managing individual subscriptions. You might use a Stripe subscription ID, an email address any internal ID you have if your workflow.

  2. Shared Codes: Alternatively, you can utilize the same code for multiple users. This is particularly useful when offering time-limited free promotions or other scenarios where several individuals should have access using the same code.

By grasping the significance of the code parameter in the Bonzai API, you gain the flexibility to adapt your access control strategy to various use cases and business models seamlessly.

Product Revocation

This route enables Pro members to revoke their customers product access.

This functionality is particularly useful in scenarios such as when a subscription is no longer active, or when a limited-time offer concludes, allowing Pro members to manage their product offerings effectively and responsively.

Revoke access to a product

POST https://www.bonzai.lol/api/v1/products/{product_uuid}/revoke

This function revokes access to a product.

You can revoke access using applicable filters such as access id, user_id, email, or code.

You must provide at least one valid filter.

Query Parameters

Request Body


In the next page, you will see a practical example illustrating how to automate Stripe subscription management using the Bonzai API and Zapier.

Last updated