Solution skill
Clerk organization webhooks: sync the org lifecycle with created, updated, deleted
Complete solution
Shows how to fix clerk organization webhooks: sync the org lifecycle with created, updated, deleted. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
organization.created, organization.updated, organization.deleted. On organization.updated: upsert name, slug, and metadata.
Steps
organization.created,organization.updated,organization.deleted. Same discipline as the user trio: subscribe to all three, one sync function, org id as the key.- On
organization.created: create your local org record keyed byevt.data.id. Storenameandslug. If you provision per-org resources (a workspace, a billing customer, default roles), provision them here, idempotently. - On
organization.updated: upsert name, slug, and metadata. Slug changes break URLs; if you build org URLs from the slug, update your routes or redirects on this event. - On
organization.deleted: tear down or archive the org's data in your app. Decide the policy once: hard delete, soft delete, or transfer ownership. Then apply it here, not ad hoc later. - Return 200.
- Provisioning on created but never tearing down on deleted. Orphaned workspaces, billing customers, and storage buckets accumulate silently because the delete event was never subscribed. The trio rule from the user events applies verbatim.
- - Org membership changes are separate events (organizationMembership.*). Do not conflate "org updated" with "someone joined."
- If you sync orgs, you almost certainly need the membership events too. An org record without its member list is half a sync.
- Test deletion with a throwaway org and a replay. Deletion paths are the least tested and the most destructive when wrong.
When to use
You are seeing this: Same discipline as the user trio: subscribe to all three, one sync function, org id as the key. Use this skill when you run into "Clerk organization webhooks: sync the org lifecycle with created, updated, deleted".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Clerk's event catalog (Dashboard → Webhooks → Event Catalog) lists organization.created, organization.updated, and organization.deleted. The syncing guide documents the webhook-driven sync pattern. Verified live at https://clerk.com/docs/guides/development/webhooks/syncing.
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_kTgvQX289C6eYoVBfTf15g" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Clerk organization webhooks: sync the org lifecycle with created, updated, deleted <span>— Vectle</span></a>