Service Accounts
Rotate a service account API key
DESTRUCTIVE: atomically revokes the existing key and issues a replacement that inherits its name, returning the new one-time key value (shown only once). The previous key stops authenticating the instant this call succeeds, so any client still using it will immediately start failing with 401. Update every consumer with the new value before rotating, or set gracePeriodMinutes to keep the old key valid for a short overlap window.
post/api/v0/service-accounts/{serviceAccountId}/api-keys/{keyId}/rotate
Request
- Base URL: https://api.factory.ai
- URL: https://api.factory.ai/api/v0/service-accounts/{serviceAccountId}/api-keys/{keyId}/rotate
- Auth: HTTP bearer
Path parameters
serviceAccountIdstring required
Service account ID
keyIdstring required
API key ID
Request body
Response
Response for status 200
Changes
No recorded changes to this operation across all 50 revisions of this API.