Insert, delete, update (category)

get_default_post_to_edit()

Default post information to use when populating the "Write Post" form.

wp_delete_post()

Trash or delete from the database specified post. The post can be of any type: post, attachment, page, custom type.

wp_insert_post()

Safely insert/update post in the database.

wp_publish_post()

Publish a post by transitioning the post status.

wp_trash_post()

Move a post or page to the Trash

wp_update_post()

Updates a post with new post data in WordPress Database. To work as expected, it is necessary to pass the ID of the post to be updated.