RotateApiKey generates a new secret for an existing API key. The old key remains valid for a server-defined grace period to allow migration. Returns the new full secret once — it cannot be retrieved again.
Documentation Index
Fetch the complete documentation index at: https://docs.sdk.anghami.com/llms.txt
Use this file to discover all available pages before exploring further.
OAuth 2.0 Bearer token. Required for all key management operations. Format: Bearer <access_token>.
"Bearer eyJhbGciOiJSUzI1NiIs..."
Unique identifier of the API key to rotate.
RotateApiKeyRequest is the request message for rotating an API key's secret. A new secret is generated while the old key remains valid for a server-defined grace period.
Unique identifier of the API key to rotate.
Successful response
RotateApiKeyResponse is the response message containing the rotated API key and new secret. This is the only time the new secret is returned — store it securely.
ApiKey represents a developer API key used for server-to-server authentication. API keys are passed in the x-api-key HTTP header and are billed per key. The full secret is only returned on creation and rotation.
The new full API key secret. This replaces the previous x-api-key value. The old key remains valid for a server-defined grace period.