Delete publication OAuth Scope: publications:write
Delete publication OAuth Scope: publications:write
This endpoint is currently in beta and is not yet available to every workspace.
Deletes a publication the same way deleting it from the workspace settings in the app does. This also deletes its subscribers, segments, metrics, and other associated data, frees its subdomain, removes its custom domains, removes its Stripe payout account, and cancels its paid subscriptions. Contact support if a publication was deleted by mistake.
To confirm the deletion, confirm_name must exactly match the publication’s current name. A mismatch is rejected with a 400 and the code PUBLICATION_NAME_MISMATCH. Omitting confirm_name is rejected with a 400 and the code NOT_EXIST_REQUIRED_KEY, the same as any other missing required field.
A workspace must keep at least one publication. Deleting the last one is rejected with a 422 and the code LAST_PUBLICATION_IN_WORKSPACE.
The deletion runs in the background, so this endpoint answers 202. Once it finishes, getting the publication returns a 404.
This endpoint requires an API key with access to every publication in the workspace.
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.