---
title: "Directory Deleted"
method: POST
path: "organization.directory_deleted"
---

# Directory Deleted

`POST organization.directory_deleted` (webhook)

Triggered when a directory is deleted. Deleting a directory through the API or dashboard requires disabling it first. Deleting an organization also deletes its directories, enabled or not, and sends this event for each.

## Payload

- OrganizationDirectoryDeletedEvent: Payload delivered for the organization.directory_deleted webhook event.
  - `spec_version` string, required: The webhook specification version
  - `id` string, required: Unique identifier for the webhook event (must be prefixed with "evt_")
  - `type` 'organization.directory_deleted', required: The event type
  - `occurred_at` string, date-time, required: When the event occurred (ISO 8601 format)
  - `environment_id` string, required: The environment ID where the event occurred
  - `organization_id` string: The organization ID (if applicable)
  - `object` 'Directory', required: The type of object that triggered the webhook
  - `data` DirectoryEventData, required: Directory payload for organization.directory_created, organization.directory_enabled, organization.directory_disabled and organization.directory_deleted. Only directory_enabled also sends enabled and updated_at.
    - `id` string, required: Directory identifier
    - `organization_id` string, required: Organization that owns the directory
    - `directory_type` string, required: How the directory syncs, such as SCIM
    - `provider` string, required: Directory provider
    - `enabled` boolean: Always true. Sent on directory_enabled only.
    - `updated_at` string, date-time: When the directory was last updated. Sent on directory_enabled only.

## Acknowledgement `200`

Webhook received successfully

---

[API](https://skmtc.dev/scalekit/apis/scalekit-api-reference.md) - [All operations](https://skmtc.dev/scalekit/apis/scalekit-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/scalekit/apis/scalekit-api-reference/revisions/f47f1022d844?raw)
