# Delete organization Delete an organization. This performs a soft delete, preserving the organization data for audit purposes. Only the organization owner can delete an organization. #### Path Parameters **`organization_id`** string required The unique identifier of the organization to delete (e.g., `org_abc123def456`). ## Returns Returns a `204 No Content` status on successful deletion. No response body is returned. Request ```bash cURL curl -X DELETE "https://api.aitronos.com/v1/organizations/org_abc123def456" \ -H "X-API-Key: $FREDDY_API_KEY" \ -H "Content-Type: application/json" ``` ```python Python import os import requests api_key = os.environ["FREDDY_API_KEY"] organization_id = "org_abc123def456" response = requests.delete( f"https://api.aitronos.com/v1/organizations/{organization_id}", headers={ "X-API-Key": api_key, "Content-Type": "application/json" } ) # 204 No Content - successful deletion if response.status_code == 204: print("Organization deleted successfully") ``` ```javascript JavaScript const apiKey = process.env.FREDDY_API_KEY; const organizationId = 'org_abc123def456'; const response = await fetch( `https://api.aitronos.com/v1/organizations/${organizationId}`, { method: 'DELETE', headers: { 'X-API-Key': apiKey, 'Content-Type': 'application/json' } } ); // 204 No Content - successful deletion if (response.status_code === 204) { console.log('Organization deleted successfully'); } ``` Response ```text 204 - No Content (No response body) ``` ```json 401 - Unauthorized { "success": false, "error": { "code": "unauthorized", "message": "Invalid or missing API key" } } ``` ```json 403 - Forbidden { "success": false, "error": { "code": "forbidden", "message": "Only the organization owner can delete the organization" } } ``` ```json 404 - Not Found { "success": false, "error": { "code": "not_found", "message": "Organization not found" } } ```