Skip to content

Function: deleteBlogPost()

ts
function deleteBlogPost(client, parameters): Promise<void>;

Defined in: src/v2/api/blogPost.ts:126

Delete a blog post by id.

By default this will delete blog posts that are non-drafts. To delete a blog post that is a draft, the endpoint must be called on a draft with the following param draft=true. Discarded drafts are not sent to the trash and are permanently deleted.

Deleting a blog post that is not a draft moves the blog post to the trash, where it can be restored later. To permanently delete a blog post (or "purge" it), the endpoint must be called on a trashed blog post with the following param purge=true.

Permissions required: Permission to view the blog post and its corresponding space. Permission to delete blog posts in the space. Permission to administer the space (if attempting to purge).

Parameters

ParameterTypeDescription
clientClient-
parameters{ draft?: boolean; id: number; purge?: boolean; }-
parameters.draft?booleanIf attempting to delete a blog post that is a draft.
parameters.idnumberThe ID of the blog post to be deleted.
parameters.purge?booleanIf attempting to purge the blog post.

Returns

Promise&lt;void>