Replace an existing Project Key (Legacy) with a Secret Key: a service key for shared automation, or a personal key for work performed as yourself. Keep the project key active until every integration using it has been updated and verified.

What changes

A Project Key (Legacy) belongs to one project. Secret Keys authenticate a user or service-account identity, with access to the resources and actions selected for that key. Updating the credential may also require updating the endpoint and supplying the project and Environment explicitly.

Using Service and Personal Keys

Service keys: Recommended for shared automation and production integrations. An organization administrator creates them with selected access, using a separate service-account identity. They can expire or be set to Never; plan manual replacement when choosing Never.

Personal keys: Editors can create their own without organization-admin access. They act with your account’s permissions and must expire after 1, 7, 30, 90 or 365 days; the default is 30 days. There is no Never option. Create and deploy a replacement before the key expires.

Prepare your integrations

Before changing a key:

  • List every application, deployment, scheduled job and CI secret using the project’s primary or secondary key. Record the endpoint and operations each consumer needs.
  • Record the project ID and Environment each integration should use. Find Project ID in the project’s Settings → General → Metadata. Keep the Environment alias already intended for that integration.
  • Choose who will create the replacement. For a service key, give the organization administrator the required workspaces, projects and operations. Have them provision the key in the service’s secret store and hand over its secret reference, access scope and expiry to the person updating the integration.
  • Make sure someone with permission to update the project’s API keys can retire the old keys after cutover.

Keep Secret Keys in your backend or secret store. Widget installations use client keys, and Chat actions use the sessionKey returned when a session is created. Do not put a personal or service key into website installation code.

Create and deploy the replacement

Create a Secret Key

Choose one replacement type for each consumer. You do not need to create both types to complete a migration.

Update the integration’s requests

1

Check the endpoint and credential stage

Use the current reference for each endpoint. For Platform API requests and Chat session creation, send the new key as a Bearer token:

For Chat, keep the Secret Key on the server for session creation. Continue sending the returned sessionKey directly in Authorization for subsequent actions, without a Bearer prefix.

If an import uses the older /v1alpha1/public/knowledge-base/document endpoint, move it to the Platform Document API. That API accepts Secret Keys and takes an explicit projectID and environmentAlias; replacing the key alone does not migrate the old endpoint’s request body or response fields.

2

Deploy the new secret to every consumer

Replace the legacy value in each application’s secret store and deploy or restart it as required to load the new value. Keep the old project key active while you verify the replacement. For CLI automation, update VF_TOKEN and remove or update any explicit --token value that would override it.

Verify the migration and remove old keys

1

Verify requests with the replacement

Test the operations each integration actually uses, against the intended project and Environment. A key appearing in the settings list does not establish that its permissions are sufficient.

For a read-only check, set VF_TOKEN from the new secret and VF_PROJECT_ID to the recorded project ID. The key must have permission to list Functions for this project and Environment:

Use the intended alias if it is not main. A successful JSON response, including an empty list, verifies this read operation only. Also test the Chat, Knowledge or other operations that each consumer depends on. Keep a record of which consumers have passed before retiring either old key.

2

Revoke the old project keys

After every consumer has passed with its replacement, open the original project in Voiceflow, then Settings → API keys. If a Secondary key is listed, open its More menu, choose Revoke secondary key, read the confirmation and click Yes. Then open the primary key’s More menu and choose Revoke primary key → Yes.

Open the secondary key's More menu after its consumers have moved to Secret Keys. Photo:
The confirmation identifies the key that will be permanently revoked. Photo:

Revocation removes the key permanently. If your account instead offers the older management controls, Remove secondary key deletes the secondary key and Regenerate primary key invalidates the old primary value while creating a replacement. Once all consumers use Secret Keys, remove the unused secondary key and regenerate the unused primary key to invalidate its old value. A new, unused project key remains in that case. If you require permanent removal and Revoke is unavailable, contact your Voiceflow support contact. If management controls are missing because of your access, ask someone with permission to update the project’s API keys.

After all legacy keys are removed, the API keys settings item may disappear. Your personal and service keys remain managed in the workspace dashboard’s settings.

3

Verify the deployed integrations again

Repeat each consumer’s functional check after retiring the old keys. Confirm that requests still succeed with the intended project and Environment and that no application, CI secret or explicit CLI token still uses a retired value. The migration is complete when every consumer runs on a Secret Key and the original project-key values have been revoked or invalidated. Record any unused replacement project key that remains under the older controls.

Recovery and legacy rotation

Revoked project keys cannot be recreated. Regenerating a key also invalidates its previous value immediately. Before retiring a working project key, fix any endpoint, scope or deployment problem with the replacement and verify it again. After revocation, recover by correcting or replacing the Secret Key; restoring the old value in an application does not restore the credential.

Rotate a project key while you migrate

Use these controls only if your project still offers legacy key creation and regeneration.

Rotating a Project Key (Legacy) does not complete the move to Secret Keys. If your API keys page only offers Revoke, create a personal or service key above instead; a revoked project key cannot be replaced with another project key through those controls.

1

Create a secondary key

Open the project’s Settings → API keys. In the primary key’s More menu, choose Create secondary key. If a secondary key already exists, first identify its consumers; do not regenerate or remove a value that a running integration still uses.

2

Move consumers to the secondary key

Copy the secondary key, update each consumer that uses the primary key and deploy the change. Verify each integration before continuing. The existing primary key remains active during this cutover.

3

Promote the verified secondary key

Click Promote beside the secondary key and confirm Yes. This replaces the primary key with the secondary key and invalidates the former primary value. Verify the deployed integrations again, then continue the migration to Secret Keys.

For immediate replacement without overlap, Regenerate primary key or Regenerate secondary key removes that value and creates a new one as soon as you confirm. Every consumer using the old value must receive the new value before it can authenticate again. Remove secondary key deletes that secondary key without creating a replacement.

Next steps

Use the up and down arrow keys to select a result, Enter to open it, and Escape to close the search.