From 71cad5de76e307be311d865254cd6a8168faf83b Mon Sep 17 00:00:00 2001 From: Lalit Deore Date: Mon, 23 Jun 2025 11:45:15 +0530 Subject: [PATCH 1/2] Update docs for delete suborg api --- docs/API.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/API.md b/docs/API.md index b579d92..9f8b434 100644 --- a/docs/API.md +++ b/docs/API.md @@ -1052,11 +1052,20 @@ curl https://shuffler.io/api/v1/orgs -H "Authorization: Bearer APIKEY" Deletes an organization. Only possible for sub-organizations. **This requires you to have already removed all workflows, and will NOT clean up all the data in the database until it expires (3 months~)** +**Only **admins of the parent organization** can delete a sub-organization.** Methods: DELETE ```bash -curl -XDELETE https://shuffler.io/api/v1/orgs/{org_id} -H "Authorization: Bearer APIKEY" +curl -XDELETE https://shuffler.io/api/v1/orgs/{parent_org_id} -H "Authorization: Bearer APIKEY" +``` + +### Request Body + +```json +{ + "suborg_id": "YOUR_SUBORG_ID_TO_DELETE" +} ``` **Success response** From d1201910ad82126a106183db2a42ec30f07c68ba Mon Sep 17 00:00:00 2001 From: Lalit Deore Date: Tue, 24 Jun 2025 13:21:15 +0530 Subject: [PATCH 2/2] Update new docs for the delete suborg api --- docs/API.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/docs/API.md b/docs/API.md index 9f8b434..93bad53 100644 --- a/docs/API.md +++ b/docs/API.md @@ -1057,15 +1057,7 @@ Deletes an organization. Only possible for sub-organizations. Methods: DELETE ```bash -curl -XDELETE https://shuffler.io/api/v1/orgs/{parent_org_id} -H "Authorization: Bearer APIKEY" -``` - -### Request Body - -```json -{ - "suborg_id": "YOUR_SUBORG_ID_TO_DELETE" -} +curl -XDELETE https://shuffler.io/api/v1/orgs/{org_id} -H "Authorization: Bearer APIKEY" ``` **Success response**