Skip to content

Function: deleteBlogPost() ​

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

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

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. manage/content permission for the space (if attempting to purge).

Note: To find the display name for each permission ID, call the Get available space permissions API.

Parameters ​

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

Returns ​

Promise&lt;void>