Skip to main content

API keys follow their owner's org role

ImprovementAPI, Workspace

API keys act as the user who created them, and now stay in step with that user's membership:

  • Removed or departed members' keys stop working. Removing someone from an org, or leaving one, revokes every API key they created for it. Any key whose owner is no longer a member is rejected with 401 invalid_api_key.
  • admin scope needs a current org admin. If a key's owner is demoted to member, the key keeps read and write but loses admin.
  • Org management over the API now needs admin. Creating or revoking API keys, adding, changing or removing members, sending or revoking invitations, creating or updating projects, and creating organizations (POST /api/v2/user/organizations) previously accepted a write key; they now require the admin scope, matching the in-app rule that only org admins can do these things.
  • A key can't mint a broader key. POST /api/v2/organizations/{id}/api-keys only grants scopes the calling key holds.
  • POST /api/v2/organizations/{id}/members works again. It was failing with a 500 on every call.
  • Secrets aren't kept for idempotent replays. Replaying an API-key creation with the same Idempotency-Key returns key: null, and replaying a share-link creation returns pin: null.
  • Invitations respect the member limit. Accepting an invitation into an org that is at its plan's member limit now returns the standard limit_reached response instead of going over the limit.

See Authentication.