api.*.create_api(to create APIs in any workspace)
See the API reference for the full HTTP endpoint documentation.
Usage
Flags
Unique identifier for this API namespace within your workspace. Use descriptive names like
payment-service-prod or user-api-dev to clearly identify purpose and environment. Must be 3-255 characters, start with a letter, and contain only letters, numbers, dots, hyphens, and underscores.Global Flags
| Flag | Type | Description |
|---|---|---|
--root-key | string | Override root key ($UNKEY_ROOT_KEY) |
--api-url | string | Override API base URL (default: https://api.unkey.com) |
--config | string | Path to config file (default: ~/.unkey/config.toml) |
--output | string | Output format — use json for raw JSON |
Examples
Output
Default output shows the request ID with latency, followed by the created API:--output=json, the full response envelope is returned:

