API Keys

Update an API key

Changed on

Updates one API key of the account in place, changing only the fields sent. Requires a provisioning key.

patch/v1/account/keys/{key_id}

Request

Path parameters

key_idinteger required

The key's id, as the listing reports it.

Request body

default_routing_strategy'reliability' | 'balanced' | 'latency' | 'throughput' | 'cache' nullable

A new default routing strategy, or null to let NagaAI choose. An unknown name draws a 400.

namestring

A replacement label, between 1 and 255 characters. An explicit null draws a 400.

is_enabledboolean

Whether the key works at all. A disabled key draws a 401 disabled_api_key.

credit_limitnumber double nullable

A replacement spending limit in credits, or null to clear it.

expires_atstring nullable

A later expiry, or null to clear it.

Response

The key as it stands after the change, without its secret.

idinteger required

The key's id, which is the {key_id} the per-key routes take.

namestring required

The label the key carries.

created_atstring required

When the key was created: UTC to the second, without an offset.

expires_atstring nullable required

When the key stops working, or null for one that never expires.

is_enabledboolean required

Whether the key works at all.

credit_limitnumber double nullable required

The key's own spending limit in credits, or null for none.

default_routing_strategy'reliability' | 'balanced' | 'latency' | 'throughput' | 'cache' nullable required

The key's default routing strategy, or null when NagaAI chooses.

Changes

    • breaking

      for the path request parameter key_id, the format changed from no format to int64

    • breaking

      request property list-of-types was narrowed by removing types null from media type application/json

    • breaking

      request property list-of-types was narrowed by removing types null from media type application/json

    • breaking

      request property list-of-types was narrowed by removing types null from media type application/json

    • breaking

      request property list-of-types was narrowed by removing types null from media type application/json

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response's property format changed from date-time to no format for status

    • breaking

      the response's property type changed from object to no type for status

    • breaking

      the response's property type changed from object to no type for status

    • breaking

      the response's property type changed from object to no type for status

    • breaking

      the response's property type changed from object to no type for status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • info

      api operation id updateApiKey removed and replaced with update_api_key

    • info

      added the new optional request property

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      added to the response property allOf list for the response status

    • info

      added to the response property allOf list for the response status

    • info

      added to the response property allOf list for the response status

    • info

      added to the response property allOf list for the response status

    • info

      response property credit_limit list-of-types was narrowed by removing types null from media type application/json of response 200

    • info

      response property expires_at list-of-types was narrowed by removing types null from media type application/json of response 200

    • info

      added the required property to the response with the status