Désactiver une clé API
Management key required. Désactive une clé API de modèle de cette équipe. Les requêtes peuvent être répétées.
api_key_id dans l’URL correspond au champ id, au format ak_..., renvoyé par Créer une clé API de modèle (POST /public/v1/api-keys). Conservez-le pour désactiver ou supprimer la clé, définir son plafond et consulter son utilisation. Le champ key (apikey-...) sert aux appels de modèles ; les appels de gestion utilisent toujours mgmt-... dans l’en-tête d’autorisation.
Management key required. Use a Management API Key (mgmt-...) for your Team, created by a Team Owner. Requests use the Team associated with that key.
No request body. Can manage keys owned by any member, including keys in archived projects. Repeated disabling succeeds. Deleted keys return 404. Follows existing key revocation and gateway cache refresh behavior.
Authorization
ManagementKeyBearer Management key required. Send Authorization: Bearer mgmt-....
In: header
Path Parameters
The id returned by Create a model API key (POST /public/v1/api-keys). Copy the complete ak_... value into this path parameter. Use the mgmt-... management key in the authorization header; the returned key (apikey-...) is for model calls.
^ak_[0-9A-Za-z]{22}$Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/public/v1/api-keys/ak_0123456789ABCDEFGHIJKL/disable"{ "object": "api_key", "id": "ak_0123456789ABCDEFGHIJKL", "enabled": false, "request_id": "req_example"}Last updated on