Delete an organization
DELETE/api/v1/orgs/:org
Permanently deletes the organization. Owner only — an admin is refused with 403 FORBIDDEN. The request body must repeat the organization slug as an explicit confirmation; a mismatch is a 422 VALIDATION_ERROR.
Deletion stops every check, revokes every organization-scoped session (including the caller's own), and makes the slug 404 immediately on every surface: the dashboard API, public status pages, badges and the embed widget. The slug is released and may be claimed by a new organization. There is no restore endpoint.
Every OTHER member is signed out for good. The caller is not: the 200 response carries a freshly minted replacement session, because the token they used names an organization that no longer resolves. If they still belong to at least one organization, the session is scoped to the first one (organization is set, and a refreshToken is issued). If they belong to none, the session is org-less — organization is absent, loginAction is noOrg, and there is no refreshToken (refresh grants are organization-scoped), exactly like a login by a user with no organization. Either way the caller stays authenticated and GET /api/v1/auth/me keeps answering 200.
Request
Responses
- 200
- 401
- 403
- 404
- 422
Organization deleted, plus the replacement session for the caller.
Authentication required
Permission denied
Resource not found
Validation error