Create a new API key for a user
Create a new API key for a user
Authorizations
Bearer token authentication
Body
The configuration ID to use for the API key. If not provided, the default configuration will be used.
Name of the Api Key
Organization Id of the organization that the Api Key belongs to. Eg: 'org-id'
Permissions of the Api Key.
Prefix of the Api Key
Whether the key has rate limiting enabled. server-only. Eg: true
Maximum amount of requests allowed within a window. Once the maxRequests is reached, the request will be rejected until the timeWindow has passed, at which point the timeWindow will be reset. server-only. Eg: 100
The duration in milliseconds where each request is counted. Once the maxRequests is reached, the request will be rejected until the timeWindow has passed, at which point the timeWindow will be reset. server-only. Eg: 1000
Amount to refill the remaining count of the Api Key. server-only. Eg: 100
Interval to refill the Api Key in milliseconds. server-only. Eg: 1000
User Id of the user that the Api Key belongs to. server-only. Eg: "user-id"
Response
API key created successfully
Creation timestamp
Whether the key is enabled
Unique identifier of the API key
The full API key (only returned on creation)
Whether rate limiting is enabled
ID of the reference owning the key
Current request count in window
Last update timestamp
Expiration timestamp
Last refill timestamp
Last request timestamp
Metadata associated with the key
Name of the API key
Permissions associated with the key
Prefix of the API key
Maximum requests in time window
Rate limit time window in milliseconds
Amount to refill
Refill interval in milliseconds
Remaining requests
Starting characters of the key (if configured)
