Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
CreatorUserID | optionalnullable.OptionalNullable[string] | :heavy_minus_sign: | Optional user ID of the key creator. Only meaningful for organization-owned keys where a specific member is creating the key. | user_2dHFtVWx2n56w6HkM0000000000 |
ExpiresAt | optionalnullable.OptionalNullable[time.Time] | :heavy_minus_sign: | Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected | 2027-12-31T23:59:59Z |
ExternalAPIKey | *string | :heavy_minus_sign: | Optional partner-supplied API key. Stored as a SHA-256 hash and never returned. Accepted only when authenticating with a Connect client secret; supplying it with a management key is rejected with 403. | |
ExternalUser | *string | :heavy_minus_sign: | Partner’s end-user identifier for attribution, between 1 and 512 characters. Accepted only when authenticating with a Connect client secret, where it is required; supplying it with a management key is rejected with 403. | |
IncludeBYOKInLimit | *bool | :heavy_minus_sign: | Whether to include BYOK usage in the limit | true |
Limit | optionalnullable.OptionalNullable[float64] | :heavy_minus_sign: | Optional spending limit for the API key in USD | 50 |
LimitReset | optionalnullable.OptionalNullable[operations.CreateKeysLimitReset] | :heavy_minus_sign: | Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. | monthly |
Name | string | :heavy_check_mark: | Name for the new API key | My New API Key |
WorkspaceID | *string | :heavy_minus_sign: | The workspace to create the API key in. Defaults to the default workspace if not provided. | 0df9e665-d932-5740-b2c7-b52af166bc11 |