Skip to main content
Create an identity to group multiple API keys under a single entity. Identities enable shared rate limits and metadata across all associated keys. Perfect for users with multiple devices, organizations with multiple API keys, or when you need unified rate limiting across different services. Important: External IDs must be unique within your workspace. Attempting to create an identity with a duplicate external ID returns a 409 Conflict error. Required permissions:
  • identity.*.create_identity
See the API reference for the full HTTP endpoint documentation.

Usage

Flags

string
required
Your system’s unique identifier for the user, organization, or entity. Must be unique across your workspace --- duplicate external IDs return a 409 Conflict error. This identifier links Unkey identities to your authentication system, database records, or tenant structure. Accepts letters, numbers, underscores, dots, and hyphens (1—255 characters).
JSON string
JSON object of arbitrary metadata stored on the identity. This metadata is returned during key verification, eliminating additional database lookups for contextual information. Useful for subscription details, feature flags, user preferences, and organization information. Avoid storing sensitive data as it is returned in verification responses.
JSON string
JSON array of shared rate limit configurations for all keys under this identity. Rate limit counters are shared across all keys belonging to this identity, preventing abuse by users with multiple keys. Each named limit can have different thresholds and windows. Maximum of 50 rate limit configurations.

Global Flags

Examples

Output

Default output shows the request ID, followed by the created identity:
With --output=json, the full response envelope is returned:
Last modified on July 23, 2026