Delete Specific Sub Organization

Delete Specific Sub Organization

This endpoint deletes a specific sub-organization by providing its sub-organization ID. Only sub-organizations with no members can be deleted. Ensure all members and admins are removed from the sub-organization before attempting deletion.


HTTP Method and URL

  • Method: DELETE

  • URL: {{host}}/api/v2/organizations/sub/:uuid?user_type=ENTERPRISE_API


Authentication Requirements

This request requires authentication. Include a valid user token in the request headers:

Header KeyValueDescription
user-tokenUser authentication token

Path and Query Parameters

  • Path Parameter:

    • uuid (string, required): The unique identifier of the sub-organization to delete.
  • Query Parameter:

    • user_type (string, required): Must be set to ENTERPRISE_API.

Request Body

This request does not require a body.


Example Request

DELETE {{host}}/api/v2/organizations/sub/ba0d5d22-aa81-498c-a022-4bee8f48ee57?user_type=ENTERPRISE_API
Headers:
  user-token: <your_token_here>

Example Successful Response

{
  "message": "Sub-organization deleted successfully."
}

Error Responses

  • 400 Bad Request: Invalid sub-organization ID or missing required parameters.

  • 401 Unauthorized: Authentication failed or missing user token.

  • 403 Forbidden: Insufficient permissions to delete the sub-organization.

  • 409 Conflict: Sub-organization contains members or admins and cannot be deleted.

  • 404 Not Found: Sub-organization with the specified ID does not exist.


Usage Notes

  • Ensure the sub-organization has no members or admins before deletion.

  • Deletion is irreversible; all associated data will be permanently removed.

  • Use this endpoint with caution in production environments.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
Query Params
string
Response

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here!