document the delete organization sub account endpoint - #56
Open
oshchyhol wants to merge 4 commits into
Open
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Sep 8, 2026
oshchyhol
marked this pull request as ready for review
September 8, 2026 09:20
oshchyhol
force-pushed
the
MT-23420-delete-sub-account
branch
from
September 9, 2026 11:42
846986b to
bb831d1
Compare
IgorDobryn
approved these changes
Sep 11, 2026
| A repeated call for the same sub account returns `404`, because a sub account that is already | ||
| scheduled for deletion is no longer listed. | ||
|
|
||
| Rate limit: 10 requests per minute per organization. |
Contributor
There was a problem hiding this comment.
Is there specific rate limiting in this case?
Contributor
Author
There was a problem hiding this comment.
yes, there is one for this endpoint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Sub-accounts can now be deleted from the organization panel, and the same action is exposed over
the public API.
DELETE /api/organizations/{organization_id}/sub_accounts/{sub_account_id}is notdescribed in the spec yet, so it is missing from the rendered reference.
Changes
deleteOrganizationSubAccount: newdeleteoperation on/api/organizations/{organization_id}/sub_accounts/{sub_account_id}, tagged Organizations,reusing the existing
organization_idandsub_account_idparameterssub-account outside the organization, 404 on an unknown or already deleted sub-account,
409 when a deletion for the same sub-account is already running, 429 over the rate limit of
10 requests per minute per organization
deleting the organization's last sub-account also deletes the organization
operation; the SDK methods land in the companion PRs below
RateLimitExceededResponseschema andLIMIT_EXCEEDEDresponse for the 429, which thespec had no shared definition for
How to test
organization_idandsub_account_idpath params, cURL / Node.js / PHP / Python / Ruby /.NET / Java samples, and 204/401/403/404/409/429 responses
{"errors": "Rate limit exceeded"}DELETE /api/organizations/:organization_id/sub_accounts/:idwitha token holding Sub-accounts Creation & Listing Admin returns 204 and the sub-account is gone
from
GET /api/organizations/:organization_id/sub_accountsDELETEfor the same sub-account while the first one is still in flight returns 409with
{"errors": "Another action in progress. Wait until it's finished"}Companion PRs
Caveat: merge after the backend change ships – the endpoint does not exist in production yet. The
documented last-sub-account behaviour is inherited from the existing deletion flow; if that gets a
guard before release, the description needs updating.