# Update an API key

Endpoint: PUT /keys/{keyId}
Version: 2025-03-26
Security: oauth2, bearerAuth, apiKeyHeader

## Path parameters:

  - `keyId` (string, required)
    The API key id.

## Request fields (application/json):

  - `apiVersion` (string)
    The version of the API this API key is tied to. Must be in the format `YYYY-MM-DD`. For example, `2024-05-22`.
    Example: 2024-05-22

  - `description` (string)
    A description of the API key. This field is optional and can be used to provide additional context about the API key.

  - `whitelistedIPs` (array)
    IP addresses or CIDR blocks for which to restrict access to this API key.
    Example: ["1.1.1.1","2.2.2.2","10.10.0.0/16"]

## Response 200 fields (application/json):

  - `apiVersion` (string)
    The version of the API this API key is tied to. Must be in the format `YYYY-MM-DD`. For example, `2024-05-22`.
    Example: 2024-05-22

  - `apiVersionDowngradeNotAllowedAfter` (string)
    A UTC timestamp corresponding to when the API key's version can no longer be downgraded. This timestamp is set to 7 days after the API key's version is updated.

  - `apiVersionUpdatedAt` (string)
    A UTC timestamp corresponding to when the API key's version was last updated. This timestamp is updated when the API key's version is updated.

  - `companyId` (string)

  - `createdAt` (string)

  - `deletedAt` (string)

  - `description` (string)
    A description of the API key. This field is optional and can be used to provide additional context about the API key.

  - `id` (string)

  - `key` (string)

  - `status` (string)
    Enum: "active", "inactive"

  - `updatedAt` (string)

  - `userId` (string)

  - `whitelistedIPs` (array)
    IP addresses or CIDR blocks for which to restrict access to this API key.
    Example: ["1.1.1.1","2.2.2.2","10.10.0.0/16"]

