API Keys
Rotate an API key's secret
Replace the key's secret in place, keeping its id, name and scopes. The PREVIOUS secret stops authenticating immediately — there is no overlap window — so anything still using it starts failing on its next request. As with creation, the new secret is not returned: the response carries lastFour and a one-time revealUrl. A revoked key cannot be rotated (400 KEY_REVOKED).
Requires the api-keys:write scope — Create, rotate, and revoke API keys — these keep working even after you disconnect this app.
post/api/projects/{id}/api-keys/{keyId}/rotate
Request
- Base URL: https://api.sendly.now
- URL: https://api.sendly.now/api/projects/{id}/api-keys/{keyId}/rotate
- Auth: one of:
- API key in cookie better-auth.session_token
- OAuth 2 (authorization code, authorization URL https://app.sendly.now/api/auth/oauth2/authorize, token URL https://app.sendly.now/api/auth/oauth2/token, scopes: api-keys:write)
Path parameters
idstring required
Project id.
keyIdstring required
API key id.
Response
API key rotated; the new secret is behind the reveal link.
Changes
No recorded changes to this operation across all 1 revision of this API.