Skip to main content
POST
Create API Key

Overview

Create a new API key with specific permissions and rate limits for accessing the ZKScore API. This endpoint allows developers to generate secure API keys that can be used to authenticate requests and access platform features.
Use this endpoint to create API keys for your applications. Store the API key securely and never expose it in client-side code. Use environment variables or secure key management systems.

Parameters

string
required
Human-readable name for the API key
Choose a descriptive name that helps identify the key’s purpose (e.g., “Production App”, “Development Testing”)
string
Optional description of the API key’s intended use
array
required
Array of permissions for the API key
object
Rate limiting configuration
string
ISO 8601 timestamp when the API key expires (optional)
array
Webhook configurations
object
Additional metadata for the API key

Response

boolean
Indicates if the API key was created successfully
string
The generated API key (only shown once)
Store this API key securely. It will not be shown again and cannot be recovered if lost.
string
Unique identifier for the API key
object
API key details
array
Configured webhooks
string
ISO 8601 timestamp of the response

Examples

Response Example

Use Cases

1. Application API Keys

Create API keys for different applications:

2. Environment-Specific Keys

Create keys for different environments:

3. Restricted Access Keys

Create keys with specific restrictions:

4. Webhook Integration

Create keys with webhook configurations:

5. Batch Key Creation

Create multiple keys at once:

Best Practices

1. Security

Implement secure API key management:

2. Rate Limiting

Handle rate limits appropriately:

3. Key Rotation

Implement key rotation:

4. Monitoring

Monitor API key usage:

Troubleshooting

”Invalid permissions”

Cause: Invalid permission configuration. Solution:
  • Use supported resources: identity, scores, achievements, trading, trust, attestations, all
  • Use supported actions: read, write, delete, all
  • Check permission structure

”Rate limit too high”

Cause: Requested rate limits exceed your plan limits. Solution:
  • Check your plan’s rate limits
  • Reduce requested limits
  • Upgrade your plan if needed

”Invalid webhook URL”

Cause: Webhook URL is invalid or unreachable. Solution:
  • Ensure webhook URL is accessible
  • Check URL format
  • Verify webhook endpoint is working

”API key already exists”

Cause: API key with same name already exists. Solution:
  • Use a different name
  • Check existing keys
  • Use unique identifiers

Rate Limits

API key creation requests are subject to rate limits:
  • Free tier: 5 keys per day
  • Starter tier: 20 keys per day
  • Professional tier: 100 keys per day
  • Enterprise tier: Custom limits
Implement key rotation to manage key lifecycle.