← Blog Home

Bolt.new’s Secret Weapon: How They Created a Viral Referral Program and Generated Billions of Tokens

Posted by Kevin Yun | Last updated Jul 16, 2025

Background

Bolt.new is a popular tool that allows anyone without a programming background to create and deploy full-stack web and mobile apps using AI. They were one of the original AI builders of 2024 and amassed a user base of millions of users in a matter of months. They are also one of the fastest growing startups in history, reaching $40M in annual recurring revenue in six months.

Bolt was looking to capitalize on their rocketship growth by launching a referral program. They wanted to reward their users for referring new users to their platform.

Bolt chose to use GrowSurf's referral software to power their referral program. Features that stood out to them were a flexible API, webhooks, and rate limits that could support their enormous and growing scale.

Referral program schema

Bolt.new wanted double-sided rewards for their referral program on two events.

  • If a user referred their friend, both users would get 200k in bonus referral tokens.
  • If the referral converted to a paid plan within 30 days, the referrer and referral would both get 5M tokens.

Free users could refer anyone for the 200k referral bonus, however the 5M referral token reward would only be available to paid users.

Referral landing

Technical overview

Here is an overview of what Bolt needed to implement to launch their referral program:

  • Create a GrowSurf campaign
  • Generate referral links for users
  • Track referral signups
  • Award referral signups
  • Track referral conversions
  • Award referral conversions

Bolt used the following developer tools from GrowSurf:

Create a GrowSurf campaign

Bolt first needed to create a campaign in the GrowSurf dashboard. They added a double-sided reward for both the referrer and the referred user. This represented the main 5M referral conversion event. The 200k token would be handled separately via webhooks later.

Double-sided reward
The Bolt.new referral program

Bolt also utilized reward metadata to add the values of paidTokenCount: 5000000 and freeTokenCount: 200000. These metadata values would be referenced later when automating rewards using webhooks and was useful because Bolt's marketing team could make changes anytime to reward values in the future without needing to get their engineering team involved.

Reward metadata

Generate referral links for users

The next thing Bolt needed to do was generate referral links for their users.

They added a new button to their dashboard that said "Get free tokens". It was highlighted in green to make it stand out.

Get free tokens button

When users would click on it, it would open up a popup with their unique referral link.

Referral link popup

Bolt generated the user's referral link by calling the /POST Add Participant endpoint.

They would pass in the user's email address and the referral link would be generated automatically. To take advantage of GrowSurf's anti-fraud system, they also passed in the user's IP address and fingerprint.

Here is an example of the API call:


      curl -X POST https://api.growsurf.com/v2/campaign/CAMPAIGN_ID/participant \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -d '{
        "email": "bob@smith.com",
        "ipAddress": "123.45.67.89",
        "fingerprint": "cfb163bd47ba666c52cb932c521e47f4"
      }'
  

Bolt does not collect user first names or last names, however if they did, they could pass those into the GrowSurf API call for further anti-fraud measures.

For users that had already generated referral links, they would call the /GET Participant by Email endpoint to display the referral link and referral stats.

Track referral signups

When someone landed on their friend's unique referral link, they would land on a URL that looked like https://bolt.new/?rid=abc123.

Bolt would then show a personalized popup upon landing that said "You've been referred by {{referrer-username}}" with details of the 200k referral signup bonus.

Referral landing

To ensure they were persisting the referrer cookie across different browser sessions and regardless of different webpages, GrowSurf provided them with the following JavaScript code:


        function getQueryParam(name) {
            const urlParams = new URLSearchParams(window.location.search);
            return urlParams.get(name);
        }

        function setCookie(name, value, days) {
            let expires = "";
            if (days) {
                const date = new Date();
                date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
                expires = "; expires=" + date.toUTCString();
            }
            document.cookie = `${name}=${value}; domain=.bolt.new; path=/;${expires}`;
        }

        const rid = getQueryParam("rid");
        if (rid) {
            setCookie("rid", rid, 365); // Store for 365 days
        }
    

Normally, GrowSurf's Universal Code (a snippet of code that can be added to any website) would be used to track referrals. However, Bolt wanted an API-only solution to ensure they could track referrals without adding any latency. The above JS code could be added to the bottom of their landing page without adding any additional load to their servers.

For tracking when the new referred user signed up, Bolt used the same GrowSurf API call as before, /POST Add Participant , to track referral signups. They would pass in the user's email address, as well as a referredBy parameter. They also passed in the optional parameters of IP address and fingerprint to ensure they would be able to get anti-fraud protection benefits.

This call would add the new user to the GrowSurf database and the referredBy parameter would be used to link the new user to the referrer.

Here is an example of the API call:


      curl -X POST https://api.growsurf.com/v2/campaign/CAMPAIGN_ID/participant \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -d '{
        "email": "sarah.taylor@somewebsite.com",
        "referredBy": "abc123",
        "ipAddress": "345.67.89.10",
        "fingerprint": "xyz7847x29bd26cb9326c521ec5f4148"
      }'
    

The referredBy parameter is the rid parameter from the referral link.

Award referral signups

Using GrowSurf's webhooks, Bolt was able to award both the referrer and the referred user 200k tokens for the referral signup.

They used the NEW_PARTICIPANT_ADDED event, which included data of the new user, their referrer, and the campaign reward in each payload.

By utilizing reward metadata, Bolt was able to award the referrer and the referred user using the data.campaign.rewards[0].metadata.freeTokenCount value of 200000 tokens for the referral signup.

Track paid referral conversions

For the 5M referral token reward, Bolt needed to track when the referral converted to a paid user.

Whenever the referred user would convert into a paying customer, they would call the GrowSurf API endpoint /POST Trigger Referral by Participant Email .

Here is an example of the API call:


        curl -X POST https://api.growsurf.com/v2/campaign/CAMPAIGN_ID/participant/sarah.taylor@somewebsite.com/ref \
        -H "Authorization: Bearer YOUR_API_KEY"
    

In this example, the user sarah.taylor@somewebsite.com would be the referred user who converted to a paid user.

Award paid referral conversions

When Bolt would trigger the referral conversion, there would be a new reward unlocked for both parties.

Using GrowSurf's webhooks again, Bolt was able to award the referrer and referred friend the 5M tokens bonus for the referral conversion.

They used the PARTICIPANT_REACHED_A_GOAL webhook event, which would fire off twice -- one representing the 5M token reward for the referrer and one representing the 5M token reward for the referral.

Bolt utilized reward metadata again and referenced the data.campaign.rewards[0].metadata.paidTokenCount value of 5000000 tokens to automate the primary 5m token reward issuance.

Launch

Bolt took weeks to prepare for the launch of their referral program. They wanted to ensure that they had everything in place to launch smoothly.

Initial implementation took a few weeks, and they officially launched their referral program on Feb 6, 2024.

Referral program launch

Results

Bolt's referral program was a huge success. They were able to generate 1 billion tokens in the first 9 hours alone, representing tens of thousands of referrals.

9 billion tokens generated

Because Bolt used GrowSurf, they were able to scale their referral program to support their ever-growing user base. Bolt's engineers could move on to focus on their core product and other projects, while GrowSurf handled growth for them on autopilot.

Bolt's support team is also able to easily manage their referral program from the GrowSurf admin dashboard. When customer issues arise, the team can quickly identify and rectify any referral program-related problems.

Put your growth on autopilot

GrowSurf is modern referral program software that helps product and marketing teams launch an in-product customer referral program in days, not weeks. Start your free trial today.

Control Your Privacy
Websites may store or retrieve information on your browser, mostly in the form of cookies. This information is used to personalize your experience and is not usually linked to your identity. You can choose not to allow certain types of cookies, but it may affect your website experience. Learn more and change settings by clicking on the different categories.
ComplyDog
We use cookies as an essential part of our website


Refer and Earn $100

How it works

1

1. Share your unique link with friends or colleagues that are looking for a referral marketing software solution.

2

2. If your friend becomes a GrowSurf customer (31 days after their first payment), we'll send you a $100 gift card and your friend will get a $100 discount on their first invoice.

3

3. Keep sharing GrowSurf to stack your referral rewards (there are no limits!).

Referral Program FAQ

  • I know someone whose company could use GrowSurf. How can I make a referral?
    To start the referral process, please sign up (or log in) to our referral program here. Once you’ve signed up, you can share your unique referral link via email, social networks, and direct email invite. Please note, in order to take part in our referral program, terms and conditions apply. You may view the terms of service of our referral program here.
  • What is a successful referral?
    In order for a referral to count, the person you’ve referred must be brand new to GrowSurf when they sign up and have passed our minimum qualified lead requirements. They must not have been contacted by our team or been a customer or trial user of GrowSurf prior to signup.
  • How do I know how many of my referrals have signed up?
    Once you’ve signed up for our referral program, you will be able to see how many of your referrals have signed up by logging into our referral portal here.
  • If one of my referrals books a demo call, when and how do I get my reward?
    All referrals must be qualified prospects based on our minimum requirements. We manually approve all rewards after a demo call is completed. Once your reward is approved, you will receive an email from us notifying you with more details.
  • My referral forgot to use my unique referral link to sign up. Is there a way I can still receive credit?
    Please contact our team at support@growsurf.com to assist you.

Terms of Service

  • All referrals are manually approved by our team. Self-referrals are not allowed. Abuse or gaming will result in having your account banned.
  • Referral program is limited to GrowSurf customers (including members of paid GrowSurf team accounts)
  • This offer cannot be combined with any other affiliate or promotional offer
0
GrowSurf
Join our referral program