Change news slug

View as Markdown
Atomically changes the slug, creates a 301 redirect, and retargets inbound chains to the final public URL. Returns 409 when another record currently owns the new slug (slug-held-by-record) or a redirect row already claims its public path (slug-held-by-redirect). Company-class entity slugs keep the HQ location suffix; Product and Service slugs stay scoped to their provider pair: a rename may reuse a slug held by another provider's offering and returns 409 only for a same-provider sibling, a non-product holder, or a redirect owning the provider-scoped path.

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

Path parameters

newsIdintegerRequired
News article id

Query parameters

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.

overrideGateenumOptional
Gate to override from the prior ProblemDetail resolution.
overrideReasonstringOptional0-2048 characters

Source-backed reason for overriding the returned gate requirement.

Request

This endpoint expects an object.
newSlugstring or nullRequired

New URL slug. Must be non-blank, normalized, and differ from the current slug.

Response

OK
newSlugstring
newUrlstring
oldSlugstring
oldUrlstring
redirectobject
URL slug redirect row
resourceTypeenum
Resource type whose slug is being changed

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
406
Not Acceptable Error
409
Conflict Error
415
Unsupported Media Type Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error