> **Building with AI coding agents?** If you're using an AI coding agent, install the official Scalekit plugin. It gives your agent full awareness of the Scalekit API — reducing hallucinations and enabling faster, more accurate code generation.
>
> - **Claude Code**: `claude plugin marketplace add scalekit-inc/claude-code-authstack && claude plugin install <auth-type>@scalekit-auth-stack`
> - **GitHub Copilot CLI**: `copilot plugin marketplace add scalekit-inc/github-copilot-authstack` then `copilot plugin install <auth-type>@scalekit-auth-stack`
> - **Codex**: run the bash installer, restart, then open Plugin Directory and enable `<auth-type>`
> - **Skills CLI** (Windsurf, Cline, 40+ agents): `npx skills add scalekit-inc/skills --list` then `--skill <skill-name>`
>
> `<auth-type>` / `<skill-name>`: `agentkit`, `full-stack-auth`, `mcp-auth`, `modular-sso`, `modular-scim` — [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Organization events

Explore the webhook events related to organization operations in Scalekit, including creation, updates, and deletions.
This page documents the webhook events related to organization operations in Scalekit.

----

## Organization events

### `organization.created`

This webhook is triggered when a new organization is created. The event type is `organization.created`

```json title="organization.created"
{
  "environment_id": "env_1234567890",
  "id": "evt_1234567890",
  "object": "Organization",
  "occurred_at": "2024-01-15T10:30:00.123456789Z",
  "organization_id": "org_1234567890",
  "spec_version": "1",
  "type": "organization.created",
  "data": {
    "create_time": "2025-12-09T09:25:02.02Z",
    "display_name": "AcmeCorp",
    "external_id": "org_external_123",
    "id": "org_1234567890",
    "metadata": null,
    "region_code": "US",
    "update_time": "2025-12-09T09:25:02.025330364Z",
    "settings": {
      "features": [
        {
          "enabled": true,
          "name": "sso"
        },
        {
          "enabled": false,
          "name": "dir_sync"
        }
      ]
    }
  }
}
```

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Unique identifier for the organization |
| `external_id` | string \| null | External identifier for the organization, if provided |
| `display_name` | string \| null | Name of the organization, if provided |
| `region_code` | string \| null | Geographic region code for the organization (US, EU), currently limited to US |
| `create_time` | string | Timestamp of when the organization was created  |
| `update_time` | string \| null | Timestamp of when the organization was last updated |
| `metadata` | object \| null | Additional metadata associated with the organization |
| `settings` | object \| null | Organization settings including feature flags (sso, dir_sync) |
| `settings.features` | array | Array of feature objects with enabled status and name |

### `organization.updated`

This webhook is triggered when an organization is updated. The event type is `organization.updated`

```json title="organization.updated"
{
  "environment_id": "env_1234567890",
  "id": "evt_2345678901",
  "object": "Organization",
  "occurred_at": "2024-01-15T10:35:00.123456789Z",
  "organization_id": "org_1234567890",
  "spec_version": "1",
  "type": "organization.updated",
  "data": {
    "create_time": "2025-12-09T09:25:02.02Z",
    "display_name": "AcmeCorp",
    "external_id": "org_external_123",
    "id": "org_1234567890",
    "metadata": null,
    "region_code": "US",
    "update_time": "2025-12-09T09:25:02.025330364Z",
    "settings": {
      "features": [
        {
          "enabled": true,
          "name": "sso"
        },
        {
          "enabled": false,
          "name": "dir_sync"
        }
      ]
    }
  }
}
```

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Unique identifier for the organization |
| `external_id` | string \| null | External identifier for the organization, if provided |
| `display_name` | string \| null | Name of the organization, if provided |
| `region_code` | string \| null | Geographic region code for the organization (US, EU), currently limited to US |
| `create_time` | string | Timestamp of when the organization was created  |
| `update_time` | string \| null | Timestamp of when the organization was last updated |
| `metadata` | object \| null | Additional metadata associated with the organization |
| `settings` | object \| null | Organization settings including feature flags (sso, dir_sync) |
| `settings.features` | array | Array of feature objects with enabled status and name |

### `organization.deleted`

This webhook is triggered when an organization is deleted. The event type is `organization.deleted`

```json title="organization.deleted" collapse={19-28}
{
  "environment_id": "env_1234567890",
  "id": "evt_3456789012",
  "object": "Organization",
  "occurred_at": "2024-01-15T10:40:00.123456789Z",
  "organization_id": "org_1234567890",
  "spec_version": "1",
  "type": "organization.deleted",
  "data": {
    "create_time": "2025-12-09T09:25:02.02Z",
    "deleted_at": "2025-12-09T10:25:45.337417Z",
    "display_name": "AcmeCorp",
    "external_id": "org_external_123",
    "id": "org_1234567890",
    "metadata": null,
    "region_code": "US",
    "update_time": "2025-12-09T09:25:02.025330364Z",
    "settings": {
      "features": [
        {
          "enabled": true,
          "name": "sso"
        },
        {
          "enabled": false,
          "name": "dir_sync"
        }
      ]
    }
  }
}
```

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Unique identifier for the organization |
| `external_id` | string \| null | External identifier for the organization, if provided |
| `display_name` | string \| null | Name of the organization, if provided |
| `region_code` | string \| null | Geographic region code for the organization (US, EU), currently limited to US |
| `create_time` | string | Timestamp of when the organization was created  |
| `deleted_at` | string \| null | Timestamp of when the organization was deleted |
| `update_time` | string \| null | Timestamp of when the organization was last updated |
| `metadata` | object \| null | Additional metadata associated with the organization |
| `settings` | object \| null | Organization settings including feature flags (sso, dir_sync) |
| `settings.features` | array | Array of feature objects with enabled status and name |

## Organization domain events

### `organization.domain_created`

This webhook is triggered when a domain is added to an organization. The event type is `organization.domain_created`

```json title="organization.domain_created"
{
  "environment_id": "env_1234567890",
  "id": "evt_4567890123",
  "object": "OrganizationDomain",
  "occurred_at": "2024-01-15T11:00:00.123456789Z",
  "organization_id": "org_1234567890",
  "spec_version": "1",
  "type": "organization.domain_created",
  "data": {
    "id": "dom_1234567890",
    "domain": "acmecorp.com",
    "domain_type": "ORGANIZATION_DOMAIN",
    "verification_status": "VERIFIED",
    "verification_method": "ADMIN",
    "create_time": "2024-01-15T11:00:00.123456789Z",
    "update_time": "2024-01-15T11:00:00.123456789Z"
  }
}
```

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Unique identifier for the domain (`dom_` prefix) |
| `domain` | string | The domain name that was added |
| `domain_type` | string | `ORGANIZATION_DOMAIN` for SSO/SCIM domains; `ALLOWED_EMAIL_DOMAIN` for auto-join domains |
| `verification_status` | string | Current status: `PENDING`, `VERIFIED`|
| `verification_method` | string | How the domain was verified: `DNS` (TXT record), `ADMIN` (added by the B2B app team), or `NOT_APPLICABLE`(for allowed email domains) |
| `create_time` | string | Timestamp of when the domain was added |
| `update_time` | string | Timestamp of the last status update |

### `organization.domain_deleted`

This webhook is triggered when a domain is removed from an organization. The event type is `organization.domain_deleted`

```json title="organization.domain_deleted"
{
  "environment_id": "env_1234567890",
  "id": "evt_5678901234",
  "object": "OrganizationDomain",
  "occurred_at": "2024-01-15T12:00:00.123456789Z",
  "organization_id": "org_1234567890",
  "spec_version": "1",
  "type": "organization.domain_deleted",
  "data": {
    "id": "dom_1234567890",
    "domain": "acmecorp.com",
    "domain_type": "ORGANIZATION_DOMAIN",
    "verification_status": "VERIFIED",
    "verification_method": "DNS",
    "create_time": "2024-01-15T11:00:00.123456789Z",
    "update_time": "2024-01-15T12:00:00.123456789Z"
  }
}
```

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Unique identifier for the domain (`dom_` prefix) |
| `domain` | string | The domain name that was removed |
| `domain_type` | string | `ORGANIZATION_DOMAIN` or `ALLOWED_EMAIL_DOMAIN` |
| `verification_status` | string | Status at the time of deletion |
| `verification_method` | string | `DNS`, `ADMIN`, or `NOT_APPLICABLE` |
| `create_time` | string | Timestamp of when the domain was originally added |
| `update_time` | string | Timestamp of the deletion |

### `organization.domain_dns_verification_success`

This webhook is triggered when Scalekit's background DNS check successfully confirms that the organization has published the required TXT record for an organization domain. The event type is `organization.domain_dns_verification_success`

```json title="organization.domain_dns_verification_success"
{
  "environment_id": "env_1234567890",
  "id": "evt_6789012345",
  "object": "OrganizationDomain",
  "occurred_at": "2024-01-15T13:00:00.123456789Z",
  "organization_id": "org_1234567890",
  "spec_version": "1",
  "type": "organization.domain_dns_verification_success",
  "data": {
    "id": "dom_1234567890",
    "domain": "acmecorp.com",
    "domain_type": "ORGANIZATION_DOMAIN",
    "verification_status": "VERIFIED",
    "verification_method": "DNS",
    "create_time": "2024-01-15T11:00:00.123456789Z",
    "update_time": "2024-01-15T13:00:00.123456789Z"
  }
}
```

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Unique identifier for the domain (`dom_` prefix) |
| `domain` | string | The domain that was verified |
| `domain_type` | string | `ORGANIZATION_DOMAIN` |
| `verification_status` | string | `VERIFIED` |
| `verification_method` | string | `DNS` |
| `create_time` | string | Timestamp of when the domain was added |
| `update_time` | string | Timestamp when verification completed |

### `organization.domain_dns_verification_failed`

This webhook is triggered when the domain verification window expires without a successful DNS TXT record match for an organization domain. The event type is `organization.domain_dns_verification_failed`

```json title="organization.domain_dns_verification_failed"
{
  "environment_id": "env_1234567890",
  "id": "evt_7890123456",
  "object": "OrganizationDomain",
  "occurred_at": "2024-01-17T11:00:00.123456789Z",
  "organization_id": "org_1234567890",
  "spec_version": "1",
  "type": "organization.domain_dns_verification_failed",
  "data": {
    "id": "dom_1234567890",
    "domain": "acmecorp.com",
    "domain_type": "ORGANIZATION_DOMAIN",
    "verification_status": "FAILED",
    "verification_method": "DNS",
    "create_time": "2024-01-15T11:00:00.123456789Z",
    "update_time": "2024-01-17T11:00:00.123456789Z"
  }
}
```

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Unique identifier for the domain (`dom_` prefix) |
| `domain` | string | The domain that failed verification |
| `domain_type` | string | `ORGANIZATION_DOMAIN` |
| `verification_status` | string | `FAILED` |
| `verification_method` | string | `DNS` |
| `create_time` | string | Timestamp of when the domain was added |
| `update_time` | string | Timestamp when the failure was recorded |


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
