...

/

Create, Update, and Delete a Post

Create, Update, and Delete a Post

Learn about blog post and how to create, update, and delete it.

A post, or a blog post, is an article that contains information written by an author on a specific topic. The content is published for public access. Sometimes the post is only meaningful for a limited number of users, and in some cases, for a limited time. Sometimes the posts become obsolete, such as when the technology discussed in the post changes.

Post properties

The table below shows the complete list of properties that are part of the post class.

Parameter

Type

Description

kind

string

The type of object.

Value: blogger#post

Note: This value is fixed.

id

string

The ID of the post.

blog

object

The object that contains the post's blog data.

blog.id

string

The ID of the post's blog.

published

datetime

The post's publishing date.

Format: yyyy-mm-dd

updated

datetime

The date of the post's last update.

Format: yyyy-mm-dd

url

string

The published link of the post.

selfLink

string

The Blogger API URL of the post.

title

string

The title of the post.

content

string

The content of the post.

Note: This value can include HTML.

author

object

The object that contains the post's author information.

author.id

string

The ID of the post's author.

author.displayName

string

The name of the post's author.

author.url

string

The published link to the author's profile.

author.image

object

The object that contains the author's avatar information.

author.image.url

string

The URL of the author's avatar.

replies

object

The object that contains the post's comments.

replies.totalItems

long

The number of comments on the post.

replies.selfLink

string

The Blogger API URL of the post's comments.

labels[]

list

The list of tags associated with the post.

customMetaData

string

The metadata of the post.

replies.items[]

list

The list of comments on the post.

location

object

The object that contains the location information of the post.

Note: This value is only available if the post was geotagged.

location.name

string

The name of the post's location.

location.lat

double

The latitude of the post's location.

location.lng

double

The longitude of the post's location.

location.span

string

The viewport span of the post's location.

titleLink

string

The URL of the title.

images[]

list

The post's display image.

images[].url

string

The URL of the post's display image.

status

string

The status of the post.

Note: This value is set only for admin-level requests.

Methods

We'll now take a look at different methods of the post class to create, update, and delete a blog post.

Create a post

We can create a blog post by sending a POST request to the following URL:

Press + to interact
https://blogger.googleapis.com/v3/blogs/{blogId}/posts

This endpoint requires a post object that ...