Google My Business (GMB)
Options for posting via the API to Google My Business

GMB API Endpoint

Overview

There are four types of Google My Business (GMB) posts. In the below example, the post text is the summary of the GMB update. Find out more about Google My Business.
You must claim your Google My Business page before linking it with Ayrshare. Be sure to choose the Google account that is an admin of your GMB page during link authorization.
You can access your GMB manage console at https://business.google.com/
Product posts cannot be created via the Google My Business API at this time.
JSON for a basic post with an image to GMB:
1
{
2
"post": "The best GMB ever #best https://www.google.com",
3
"mediaUrls": ["https://img.ayrshare.com/012/gb.jpg"],
4
"platforms": ["gmb"],
5
"gmbOptions": {
6
"isPhotoVideo": true
7
}
8
}
Copied!

Google My Business Posting Requirements

Please be sure your post does not contain the following. Google will reject your post and the post will show as "This post is no longer available" or with a "Rejected" label in the Google Console:
  • Phone numbers. Google will reject all posts containing phone numbers.
  • Spam, false claims, or false representation.
  • Off-topic post that doesn’t pertain to your business.
  • Duplicate content.
  • Inappropriate content.
  • Offensive language.
Please see Google My Business' Content Policy for more information.

Standard Post (What's New)

A standard post appears in the "Posts" GMB section and categorized as "What's New". It can contains post text, an image, or a Call to Action (see below).
Videos are not supported for Standard post.
These posts will appear in the "Posts -> What's New" section in the GMB management console.
1
{
2
"post": "A wonderful post",
3
"platforms": ["gmb"],
4
"mediaUrls": ["https://images.ayrshare.com/imgs/ayrshare-code-ex.jpg"], // optional
5
"gmbOptions": {
6
"callToAction": { // optional
7
"actionType": "learn_more",
8
"url": "https://www.ayrshare.com"
9
}
10
}
11
}
Copied!

Image or Video Post

An image or video can be added to your GMB location. Only one image or video is allowed per post. Note, the post text is not used, but required by the endpoint. For example, a restaurant can make a post to promote a new menu item. These may not have Call to Action.
These posts will appear in the "Photos" section in the GMB management console.
1
{
2
"post": "What an image!",
3
"platforms": ["gmb"],
4
"mediaUrls": ["https://images.ayrshare.com/imgs/ayrshare-code-ex.jpg"], // required
5
"gmbOptions": {
6
"isPhotoVideo": true //required
7
}
8
}
Copied!

Events Post

Promote an event at your business. Events require a title, start and end dates, and can include a video. For example, a real estate agent may advertise an open house showing signing. Event support Call to Action.
Optionally include an image with the mediaUrls parameter.
Videos are not supported for Events.
These posts will appear in the "Posts -> Events" section in the GMB management console.
1
{
2
"post": "A great event!",
3
"platforms": ["gmb"],
4
"mediaUrls": ["https://images.ayrshare.com/imgs/ayrshare-code-ex.jpg"], // optional
5
"gmbOptions": {
6
"event": {
7
"title": "Check this event out.", // required
8
"startDate": "2021-08-12T20:17:46.384Z", // required
9
"endDate": "2021-09-12T20:17:46.384Z" // required
10
}
11
}
12
}
Copied!

Offers Post

Provide promotional sales or offers from your business. Offers require a title as well as start and end dates and times. A "View offer" action button is automatically added to the post. You can also include a photo, description, coupon code, link, and terms and conditions with the post. For example, a toy store may advertise 20% off all beanie babies for a week.
Include an image with the mediaUrls parameter.
Videos are not supported for Offers.
These posts will appear in the "Posts -> Offers" section in the GMB management console.
1
{
2
"post": "A great offer for everyone!",
3
"platforms": ["gmb"],
4
"gmbOptions": {
5
"offer": {
6
"title": "Great Sale.", // required
7
"startDate": "2021-08-12T20:17:46.384Z", // required
8
"endDate": "2021-09-12T20:17:46.384Z", // required
9
"couponCode": "BOGO-JET-CODE", // required
10
"redeemOnlineUrl": "https://www.ayrshare.com", // required
11
"termsConditions": "Offer only valid if you can prove you are a time traveler" // required
12
}
13
}
14
}
Copied!

Call to Action

Provide general information about your business and appears as an action button. For example, a website might promote a Learn More button to redirect to their website.
A Call to Action can be added to a Standard post or Event. Offers can not have Call to Actions.
Include an image with the mediaUrls parameter.
1
{
2
"post": "Take this action!",
3
"platforms": ["gmb"],
4
"mediaUrls": ["https://images.ayrshare.com/imgs/ayrshare-code-ex.jpg"], //optional
5
"gmbOptions": {
6
"callToAction": {
7
"actionType": "order", // required
8
"url": "https://www.ayrshare.com" // required
9
}
10
}
11
}
Copied!
The actionType is displayed as a button on the post. Possible values are:
  • book: Prompts a user to book an appointment, table, or something similar.
  • order: Prompts a user to order something.
  • shop: Prompts a user to browse a product catalog.
  • learn_more: Prompts a user to see additional details on a website.
  • sign_up: Prompts a user to register, sign up, or join something.
  • call: Prompts a user to call a business.
The url parameter is the URL the user will be directed to upon clicking.