Go SDKAPI ReferenceOperations
CreateKeysRequest - Go SDK
CreateKeysRequest type definition
The Go SDK and docs are currently in beta. Report issues on GitHub.
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
Name | string | ✔️ | Name for the new API key | My New API Key |
Limit | *float64 | ➖ | Optional spending limit for the API key in USD | 50 |
LimitReset | optionalnullable.OptionalNullable[operations.CreateKeysLimitReset] | ➖ | 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 |
IncludeByokInLimit | *bool | ➖ | Whether to include BYOK usage in the limit | true |
ExpiresAt | optionalnullable.OptionalNullable[time.Time] | ➖ | Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected | 2027-12-31T23:59:59Z |
CreatorUserID | optionalnullable.OptionalNullable[string] | ➖ | Optional user ID of the key creator. Only meaningful for organization-owned keys where a specific member is creating the key. | user_2dHFtVWx2n56w6HkM0000000000 |