Delete Organization
Deletes an organization. This operation is permanent and cannot be undone.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organizationId | string | Yes | Unique identifier of the organization |
Response
Returns true if the organization was successfully deleted.
Examples
- Go
- TypeScript
import (
"context"
"github.com/silentwitness/go-sdk"
)
success, err := silentwitness.Organizations.Delete(ctx, "org_abc123def456")
if err != nil {
log.Fatal(err)
}
if success {
fmt.Println("Organization deleted")
}
import { deleteOrganization } from "@silentwitness/typescript-sdk";
const success = await deleteOrganization("org_abc123def456");
if (success) {
console.log("Organization deleted");
}
Errors
| Code | Description |
|---|---|
NOT_FOUND | Organization does not exist |
PERMISSION_DENIED | Organization belongs to a different account |
UNAUTHENTICATED | Invalid or missing API key |
warning
This operation is permanent. Always verify the organization details before deleting.