ZuploZuplo
LoginStart for Free
  • Documentation
  • API Reference
Introduction
Getting Started
    Develop in the portal
      1 - Setup Your Gateway2 - Rate Limiting3 - API Key Auth4 - Deploy5 - Dynamic Rate LimitingDynamic MCP Server - Quickstart
    Develop locally with the CLI
      1 - Setup Your Gateway2 - Rate Limiting3 - API Key Auth4 - Deploy5 - Dynamic Rate LimitingDynamic MCP Server - Quickstart
Concepts
Development
Policies
Handlers
API Keys
    OverviewWhen to Use ThemBest PracticesAuthenticationManage in the PortalConsumers in a Specific BucketEnd-User AccessDeveloper APISelf-Serve IntegrationBucketsLeak DetectionService Limits
Rate Limiting
Caching
MCP Server
MCP Gateway
AI Gateway
Developer Portal
Monetization
GraphQL
Deploying & Source Control
Analytics
Observability
Networking & Infrastructure
Account Management
Programming API
Build with AI
Zuplo CLI
Migration Guides
Platform LimitsVersion Support PolicySecuritySupportTrust & ComplianceChangelog
powered by Zudoku
API Keys

Buckets and Environments

API keys are stored in "buckets," which organize and isolate authentication credentials across different environments. Learn more in the API Key API documentation.

Default bucket configuration

Zuplo automatically creates three buckets for each project:

  • Production: Stores API keys for the production environment (your default Git branch)
  • Preview: Stores API keys shared across all preview environments (non-default Git branches)
  • Development: Stores API keys for the development (working copy) environment

For more information on how environments relate to Git branches, see Branch-Based Deployments.

Custom bucket configuration

To use a custom bucket, specify its bucketId in your API Key policy options:

Code
{ "export": "ApiKeyInboundPolicy", "module": "$import(@zuplo/runtime)", "options": { "bucketId": "bckt_2HaK3odRyJle6NJSu8mzNKBC30BYxllxL", "allowUnauthenticatedRequests": false } }

Bucket IDs start with bckt_. To find one, open Services → API Keys → Consumers in the Zuplo Portal, select the environment with the Dev / Preview / Prod switcher, then click Bucket Details.

When the configuration sets no bucket, the policy uses the default bucket for the current environment.

The policy's bucketName option is deprecated. Policies that set it keep working, but the runtime logs a warning — use bucketId instead.

Creating custom buckets

Create custom buckets using the API Key management API. See the create buckets endpoint for details.

The following example creates a bucket for a QA environment. The response includes the new bucket's id, which is the value to set as bucketId on the policy:

TerminalCode
curl --request POST \ --url https://dev.zuplo.com/v1/accounts/YOUR_ACCOUNT_NAME/key-buckets \ --header 'Authorization: Bearer YOUR_ZAPI_KEY' \ --header 'Content-Type: application/json' \ --data '{"name":"contoso-qa-bucket","description":"API Key bucket for QA Environment"}'

Replace YOUR_ACCOUNT_NAME with your account name and YOUR_ZAPI_KEY with your Zuplo API key.

Edit this page
Last modified on August 4, 2026
Self-Serve IntegrationLeak Detection
On this page
  • Default bucket configuration
  • Custom bucket configuration
  • Creating custom buckets
JSON