ZuploZuplo
LoginStart for Free
  • Documentation
  • API Reference
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
API Management
    Overview
    API Keys
      OverviewWhen to Use ThemBest PracticesAuthenticationManage in the PortalConsumers in a Specific BucketEnd-User AccessDeveloper APISelf-Serve IntegrationBucketsLeak DetectionService Limits
    Rate Limiting
    Caching
    GraphQL
    Monetization
    Policies
    Handlers
AI Gateway
MCP Gateway
MCP Server
Developer Portal
Development
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.

Bucket identifiers

Every bucket has an ID that starts with bckt_, and a name. Use the bucket ID whenever you identify a bucket, both in the Zuplo Developer API and in policy configuration. To copy it, open Services → API Keys → Consumers in the Zuplo Portal and select the environment with the Dev / Preview / Prod switcher. The Bucket ID pill sits beside the environment badge under the API Key Service heading, with a copy button.

Deprecated

The bucket name is a legacy identifier. The Zuplo Portal doesn't display it, and the Developer API accepts it only for backward compatibility on the consumer, key, and manager endpoints. Pass the bucket ID instead.

Three endpoints are the exception and still require the bucket name:

  • GET /v1/accounts/{accountName}/key-buckets/{bucketName}
  • PATCH /v1/accounts/{accountName}/key-buckets/{bucketName}
  • DELETE /v1/accounts/{accountName}/key-buckets/{bucketName}

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 } }

For more information about finding a bucket ID, see Bucket identifiers.

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 September 1, 2026
Self-Serve IntegrationLeak Detection
On this page
  • Default bucket configuration
  • Bucket identifiers
  • Custom bucket configuration
  • Creating custom buckets
JSON