top of page

Go-To-Market Tools & Solutions

PARNii.DE

Websites & Mobile Apps featuring unique design and varying levels of functionality for micro, small, and medium-sized businesses, created by an official Wix Legend Partner.

How to store API keys with the Secrets Manager in Studio Two

Nov 2
3 min read

Updated: Nov 4

Open the Secrets Manager from the Wix dashboard (Developer Tools) or from the Studio Two editor, click Add Secret, and give the API key a unique name and a value. You then read the secret from your site's backend code through the Secrets API, so the key never sits in your code.


Before you start

  • You need the Admin (Co-Owner) or Website Manager role on the site. Other collaborators cannot open the Secrets Manager.

  • Pick a name that follows the naming rules: up to 40 characters, letters, numbers, hyphens and underscores only, and not starting with wix.

  • Keep the value under 3,500 characters.

  • Plan to read the secret from backend code with the Secrets API.


Step by step

  1. Open the Secrets Manager. In the Wix dashboard, go to Developer Tools in the left sidebar and click Secrets Manager. You can also open it from inside the Studio Two editor.

  2. Start a new secret. At the top right of the Secrets Manager, click Add Secret. The Add secret panel opens.

  3. Enter the name. Type a unique name. This name is the ID you use later in code to fetch the secret. Use up to 40 characters, with letters, numbers, hyphens or underscores, and do not start with wix in any letter case.

  4. Enter the value and description. Paste the API key or token into the Value field. The limit is 3,500 characters. Add a description of up to 200 characters if you want a note for your team. The description is optional.

  5. Save the secret. Click Add Secret in the panel. The name and description appear in the list. The value is hidden.

  6. Retrieve the secret in backend code. Use the Wix Secrets API in your site's backend code and pass the secret's name. This keeps the key out of your source files and out of any shared repository.

  7. Edit a secret when a key changes. Open the More Actions menu on the secret and select Edit. To change the value, click Retrieve value and then click into the Value field. Click Change Secret to save. Update any code that depends on the old name.

  8. Delete a secret you no longer need. Open the More Actions menu and select Delete secret. Confirm with Delete Secret in the dialog. Check first that no code still uses it.


Good to know

  • Changes in the Secrets Manager apply immediately. You do not need to publish the site.

  • Changing a secret's name or value breaks all code that uses the secret.

  • A deleted secret cannot be restored, and deleting it breaks any code that uses it.

  • Transferring a site transfers its secrets to the new owner. Duplicating a site does not copy secrets to the duplicate, so add them again there.


parnii note

Because duplicated sites do not carry secrets over, add them by hand to any copy or staging site before testing. Also, update code and secret together when you rotate a key, since a changed name or value breaks code that still uses the old one.

FAQ

Who can access the Secrets Manager in Wix Studio Two?

Only site collaborators with the Admin (Co-Owner) or Website Manager role can access it. Other roles cannot open the Secrets Manager.

Do I need to publish my site after adding a secret?

No. Changes in the Secrets Manager apply immediately and do not require publishing the site.

Are secrets copied when I duplicate a site?

No. Duplicating a site does not transfer secrets to the copy. Transferring a site to a new owner does transfer them.

Sources


Part of our Wix Studio Two series (Studio 2). Last checked: 02 November 2026.

Tips and tricks every two weeks

Featured Go-To-Market (GTM) Tools and Solutions

bottom of page