Update an existing API key by ID
Update an existing API key by ID
Authorizations
Bearer token authentication
Body
The id of the Api Key
The configuration ID to use for the API key lookup. If not provided, the default configuration will be used.
Whether the Api Key is enabled or not
The name of the key
Whether the key has rate limiting enabled.
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. server-only. Eg: 1000
The refill amount
The refill interval
The number of remaining requests
The id of the user which the api key belongs to. server-only. Eg: "some-user-id"
Response
API key updated successfully
created at
Sets if key is enabled or disabled
ID
Whether the key has rate limiting enabled
The number of requests made within the rate limit time window
updated at
The owner of the user id
Expiry date of a key
The last refill date
When last request occurred
Extra metadata about the apiKey
The name of the key
Permissions for the api key (stored as JSON string)
The API Key prefix. Stored as plain text.
Maximum amount of requests allowed within a window
The duration in milliseconds
The amount to refill
The interval in milliseconds between refills of the remaining count. Example: 3600000 // refill every hour (3600000ms = 1h)
Remaining requests (every time api key is used this should updated and should be updated on refill as well)
Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key.
