Create an API namespace for organizing keys by environment, service, or product.
Use this to separate production from development keys, isolate different services, or manage multiple products. Each API gets a unique identifier and dedicated infrastructure for secure key operations.
Important: API names must be unique within your workspace and cannot be changed after creation.
Required Permissions
Your root key must have one of the following permissions:
api.*.create_api
(to create APIs in any workspace)Unkey uses API keys (root keys) for authentication. These keys authorize access to management operations in the API. To authenticate, include your root key in the Authorization header of each request:
Authorization: Bearer unkey_123
Root keys have specific permissions attached to them, controlling what operations they can perform. Key permissions follow a hierarchical structure with patterns like resource.resource_id.action
(e.g., apis.*.create_key
, apis.*.read_api
).
Security best practices:
API namespace created successfully. The response contains the unique API ID for referencing this namespace in key operations.
The response is of type object
.