Temporary API Keys

Update a temporary API key

Changed on

Update an API key's name, expiry, usage, rate, or spending limit. With an API key you can change name and expiry_date. Changing max_usage, rate_limit, spending_limit or limit_policies needs the dashboard, or a key explicitly granted the limit_policies permission.

patch/api/temporary-keys/{id}/

Request

  • Base URL
    https://api.respan.ai
  • URL
    https://api.respan.ai/api/temporary-keys/{id}/
  • Auth
    HTTP bearer

Path parameters

idstring required

The ID of the temporary API key to update.

Request body

namestring

Key name.

expiry_datestring date-time

Expiry date (ISO 8601).

max_usageinteger

Maximum use count. -1 means unlimited.

rate_limitnumber nullable
spending_limitnumber nullable

Response

Updated API key.

idstring

API key ID.

namestring

Key name.

prefixstring

Key prefix.

is_testboolean

Test or production key.

expiry_datestring date-time

Expiry date.

max_usageinteger

Max usage count. -1 = unlimited.

rate_limitnumber nullable

Requests per minute. null uses the organization default.

spending_limitnumber nullable

Spending limit in USD. null when not set.

createdstring date-time

When the API key was created.

unique_organization_idstring nullable

Owning organization UUID.

Changes

    • breaking

      the request property type changed from number null to number, and format from double to no format

    • breaking

      the request property type changed from number null to number, and format from double to no format

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response property became nullable for the status

    • breaking

      the response's property type changed from number null to number, and format from double to no format for status

    • breaking

      the response's property type changed from number null to number, and format from double to no format for status

    • info

      api operation id temporaryApiKeys_updateApiKey removed and replaced with updateApiKey

    • info

      api tag Temporary API Keys added

    • info

      api tag temporaryApiKeys removed

    • info

      the request property became nullable

    • info

      the request property became nullable

    • breaking

      the response property became nullable for the status

    • info

      added the non-success response with the status

    • info

      removed the non-success response with the status