Rotate a key's token
Issues a new token for the key. The old token stops working immediately. The key keeps its ID, name and limit. If the key belongs to a Shopify, BigCommerce or WordPress Connect integration, the response includes integration_warning: that integration stops working until it reconnects.
Send an Idempotency-Key header to retry safely.
Request
- Base URL: https://alttext.ai/api/v1
- URL: https://alttext.ai/api/v1/api_keys/{id}/rotation
- Auth: API key in header X-API-Key
Path parameters
The ID of the key.
Headers
A unique string you generate, such as a UUID. Retrying the same request with the same Idempotency-Key within 24 hours returns the original result instead of creating or rotating a second time. A retry is the same request only when the path and body match; otherwise you get idempotency_key_reused. A replay returns the token only while it is still the key's current token. After a later rotation or revocation it returns 409 idempotent_replay_superseded instead. A request that failed is not stored, so retrying it runs again.
Response
The key with its new token.
Changes
No recorded changes to this operation across all 1 revision of this API.