Delete entity

View as Markdown
Deletes an entity by id or slug; at least one identifier is required. Defaults to soft delete, which hides the entity from public list/detail reads and keeps the slug reserved. Use deleteMode=hard for permanent deletion; hard delete removes the row and releases the slug. Deleting an entity that is the current productService provider for Product/Service records returns 409 listing the child ids; delete or migrate the children first, or merge the provider so the joins repoint atomically. Response is SlugDelete with deletedMode, slugReleased, and slug so callers can confirm exactly which delete behavior was applied.

Authentication

AuthorizationBearer

User bearer token: Supabase or Clerk session JWT, Clerk OAuth access token, or Clerk personal API key

OR
X-API-Keystring

Admin API key for system-to-system write operations

Query parameters

idstringOptionalformat: "uuid"

Owner-scoped resource UUID selector.

slugstringOptionalformat: "^[a-z0-9_-]+$"<=255 characters

Owner-scoped resource slug selector.

deleteModeenumOptional

Delete mode: soft (reversible) or hard (permanent)

Allowed values:
sourceTypeenumRequired
Write provenance source type.
sourceDetailstringRequired
Source detail or reviewer reference for the write.
sourceProviderstringOptional

Provider name for provider-native IDs or slugs.

sourceProviderIdstringOptional

Provider-native source ID.

sourceProviderSlugstringOptional

Provider-native source slug.

actorTypeenumOptional

Actor type; inferred as agent when agentChassis and agentModel are supplied, or as employee from an authenticated user JWT session.

Allowed values:
agentChassisstringOptional

Agent chassis token for agent-authored writes.

agentModelstringOptional

Agent model id for agent-authored writes.

Response

OK
deletedModestring

Applied delete mode: soft or hard.

slugstringformat: "^[a-z0-9_-]+$"<=255 characters
Slug affected by the delete operation.
slugReleasedboolean
True only after hard delete. False after soft delete because the hidden row still reserves the slug.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
406
Not Acceptable Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error