curl --request POST \
--url https://api.gmbapi.com/external-api/gmb/post \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"location_id": "<string>",
"params": {
"languageCode": "<string>",
"summary": "<string>",
"callToAction": {
"url": "<string>"
},
"media": [
{
"sourceUrl": "<string>"
}
],
"event": {
"title": "<string>",
"schedule": {
"startDate": {
"year": 123,
"month": 123,
"day": 123
},
"startTime": {
"hours": 123,
"minutes": 123,
"seconds": 123
},
"endDate": {
"year": 123,
"month": 123,
"day": 123
},
"endTime": {
"hours": 123,
"minutes": 123,
"seconds": 123
}
}
},
"offer": {
"couponCode": "<string>",
"redeemOnlineUrl": "<string>",
"termsConditions": "<string>"
},
"scheduledTime": "2023-11-07T05:31:56Z"
},
"use_location_website_url": true,
"parameterMask": "<string>",
"parameters": {}
}
'import requests
url = "https://api.gmbapi.com/external-api/gmb/post"
payload = {
"location_id": "<string>",
"params": {
"languageCode": "<string>",
"summary": "<string>",
"callToAction": { "url": "<string>" },
"media": [{ "sourceUrl": "<string>" }],
"event": {
"title": "<string>",
"schedule": {
"startDate": {
"year": 123,
"month": 123,
"day": 123
},
"startTime": {
"hours": 123,
"minutes": 123,
"seconds": 123
},
"endDate": {
"year": 123,
"month": 123,
"day": 123
},
"endTime": {
"hours": 123,
"minutes": 123,
"seconds": 123
}
}
},
"offer": {
"couponCode": "<string>",
"redeemOnlineUrl": "<string>",
"termsConditions": "<string>"
},
"scheduledTime": "2023-11-07T05:31:56Z"
},
"use_location_website_url": True,
"parameterMask": "<string>",
"parameters": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
location_id: '<string>',
params: {
languageCode: '<string>',
summary: '<string>',
callToAction: {url: '<string>'},
media: [{sourceUrl: '<string>'}],
event: {
title: '<string>',
schedule: {
startDate: {year: 123, month: 123, day: 123},
startTime: {hours: 123, minutes: 123, seconds: 123},
endDate: {year: 123, month: 123, day: 123},
endTime: {hours: 123, minutes: 123, seconds: 123}
}
},
offer: {
couponCode: '<string>',
redeemOnlineUrl: '<string>',
termsConditions: '<string>'
},
scheduledTime: '2023-11-07T05:31:56Z'
},
use_location_website_url: true,
parameterMask: '<string>',
parameters: {}
})
};
fetch('https://api.gmbapi.com/external-api/gmb/post', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gmbapi.com/external-api/gmb/post",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'location_id' => '<string>',
'params' => [
'languageCode' => '<string>',
'summary' => '<string>',
'callToAction' => [
'url' => '<string>'
],
'media' => [
[
'sourceUrl' => '<string>'
]
],
'event' => [
'title' => '<string>',
'schedule' => [
'startDate' => [
'year' => 123,
'month' => 123,
'day' => 123
],
'startTime' => [
'hours' => 123,
'minutes' => 123,
'seconds' => 123
],
'endDate' => [
'year' => 123,
'month' => 123,
'day' => 123
],
'endTime' => [
'hours' => 123,
'minutes' => 123,
'seconds' => 123
]
]
],
'offer' => [
'couponCode' => '<string>',
'redeemOnlineUrl' => '<string>',
'termsConditions' => '<string>'
],
'scheduledTime' => '2023-11-07T05:31:56Z'
],
'use_location_website_url' => true,
'parameterMask' => '<string>',
'parameters' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gmbapi.com/external-api/gmb/post"
payload := strings.NewReader("{\n \"location_id\": \"<string>\",\n \"params\": {\n \"languageCode\": \"<string>\",\n \"summary\": \"<string>\",\n \"callToAction\": {\n \"url\": \"<string>\"\n },\n \"media\": [\n {\n \"sourceUrl\": \"<string>\"\n }\n ],\n \"event\": {\n \"title\": \"<string>\",\n \"schedule\": {\n \"startDate\": {\n \"year\": 123,\n \"month\": 123,\n \"day\": 123\n },\n \"startTime\": {\n \"hours\": 123,\n \"minutes\": 123,\n \"seconds\": 123\n },\n \"endDate\": {\n \"year\": 123,\n \"month\": 123,\n \"day\": 123\n },\n \"endTime\": {\n \"hours\": 123,\n \"minutes\": 123,\n \"seconds\": 123\n }\n }\n },\n \"offer\": {\n \"couponCode\": \"<string>\",\n \"redeemOnlineUrl\": \"<string>\",\n \"termsConditions\": \"<string>\"\n },\n \"scheduledTime\": \"2023-11-07T05:31:56Z\"\n },\n \"use_location_website_url\": true,\n \"parameterMask\": \"<string>\",\n \"parameters\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gmbapi.com/external-api/gmb/post")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"location_id\": \"<string>\",\n \"params\": {\n \"languageCode\": \"<string>\",\n \"summary\": \"<string>\",\n \"callToAction\": {\n \"url\": \"<string>\"\n },\n \"media\": [\n {\n \"sourceUrl\": \"<string>\"\n }\n ],\n \"event\": {\n \"title\": \"<string>\",\n \"schedule\": {\n \"startDate\": {\n \"year\": 123,\n \"month\": 123,\n \"day\": 123\n },\n \"startTime\": {\n \"hours\": 123,\n \"minutes\": 123,\n \"seconds\": 123\n },\n \"endDate\": {\n \"year\": 123,\n \"month\": 123,\n \"day\": 123\n },\n \"endTime\": {\n \"hours\": 123,\n \"minutes\": 123,\n \"seconds\": 123\n }\n }\n },\n \"offer\": {\n \"couponCode\": \"<string>\",\n \"redeemOnlineUrl\": \"<string>\",\n \"termsConditions\": \"<string>\"\n },\n \"scheduledTime\": \"2023-11-07T05:31:56Z\"\n },\n \"use_location_website_url\": true,\n \"parameterMask\": \"<string>\",\n \"parameters\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gmbapi.com/external-api/gmb/post")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"location_id\": \"<string>\",\n \"params\": {\n \"languageCode\": \"<string>\",\n \"summary\": \"<string>\",\n \"callToAction\": {\n \"url\": \"<string>\"\n },\n \"media\": [\n {\n \"sourceUrl\": \"<string>\"\n }\n ],\n \"event\": {\n \"title\": \"<string>\",\n \"schedule\": {\n \"startDate\": {\n \"year\": 123,\n \"month\": 123,\n \"day\": 123\n },\n \"startTime\": {\n \"hours\": 123,\n \"minutes\": 123,\n \"seconds\": 123\n },\n \"endDate\": {\n \"year\": 123,\n \"month\": 123,\n \"day\": 123\n },\n \"endTime\": {\n \"hours\": 123,\n \"minutes\": 123,\n \"seconds\": 123\n }\n }\n },\n \"offer\": {\n \"couponCode\": \"<string>\",\n \"redeemOnlineUrl\": \"<string>\",\n \"termsConditions\": \"<string>\"\n },\n \"scheduledTime\": \"2023-11-07T05:31:56Z\"\n },\n \"use_location_website_url\": true,\n \"parameterMask\": \"<string>\",\n \"parameters\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"payload": {
"id": "abc123",
"post_id": null,
"location_id": "12654275338176815409",
"account": "108234567890123456789",
"state": "SENDING",
"source": "external_api",
"create_time": 1756368000000,
"published_time": 1756368000000,
"update_time": null,
"scheduled_time": null,
"search_url": null,
"last_error": null,
"params": {
"languageCode": "en",
"summary": "Grand opening deals in New York this week only!",
"topicType": "STANDARD",
"callToAction": {
"actionType": "LEARN_MORE",
"url": "https://example.com/deals"
}
}
}
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"success": false,
"msg": "RATE_LIMIT_EXCEEDED",
"payload": {
"allowed": false,
"limit": 200,
"remaining": 0,
"retryAfter": 123
}
}Create Post
Creates a Google Business Profile post for one location. The location must be connected to Google. Returns 202 with state SENDING. Poll GET /post/{id} until a terminal state. Optional Idempotency-Key: the same key + account returns the existing post instead of creating a duplicate.
curl --request POST \
--url https://api.gmbapi.com/external-api/gmb/post \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"location_id": "<string>",
"params": {
"languageCode": "<string>",
"summary": "<string>",
"callToAction": {
"url": "<string>"
},
"media": [
{
"sourceUrl": "<string>"
}
],
"event": {
"title": "<string>",
"schedule": {
"startDate": {
"year": 123,
"month": 123,
"day": 123
},
"startTime": {
"hours": 123,
"minutes": 123,
"seconds": 123
},
"endDate": {
"year": 123,
"month": 123,
"day": 123
},
"endTime": {
"hours": 123,
"minutes": 123,
"seconds": 123
}
}
},
"offer": {
"couponCode": "<string>",
"redeemOnlineUrl": "<string>",
"termsConditions": "<string>"
},
"scheduledTime": "2023-11-07T05:31:56Z"
},
"use_location_website_url": true,
"parameterMask": "<string>",
"parameters": {}
}
'import requests
url = "https://api.gmbapi.com/external-api/gmb/post"
payload = {
"location_id": "<string>",
"params": {
"languageCode": "<string>",
"summary": "<string>",
"callToAction": { "url": "<string>" },
"media": [{ "sourceUrl": "<string>" }],
"event": {
"title": "<string>",
"schedule": {
"startDate": {
"year": 123,
"month": 123,
"day": 123
},
"startTime": {
"hours": 123,
"minutes": 123,
"seconds": 123
},
"endDate": {
"year": 123,
"month": 123,
"day": 123
},
"endTime": {
"hours": 123,
"minutes": 123,
"seconds": 123
}
}
},
"offer": {
"couponCode": "<string>",
"redeemOnlineUrl": "<string>",
"termsConditions": "<string>"
},
"scheduledTime": "2023-11-07T05:31:56Z"
},
"use_location_website_url": True,
"parameterMask": "<string>",
"parameters": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
location_id: '<string>',
params: {
languageCode: '<string>',
summary: '<string>',
callToAction: {url: '<string>'},
media: [{sourceUrl: '<string>'}],
event: {
title: '<string>',
schedule: {
startDate: {year: 123, month: 123, day: 123},
startTime: {hours: 123, minutes: 123, seconds: 123},
endDate: {year: 123, month: 123, day: 123},
endTime: {hours: 123, minutes: 123, seconds: 123}
}
},
offer: {
couponCode: '<string>',
redeemOnlineUrl: '<string>',
termsConditions: '<string>'
},
scheduledTime: '2023-11-07T05:31:56Z'
},
use_location_website_url: true,
parameterMask: '<string>',
parameters: {}
})
};
fetch('https://api.gmbapi.com/external-api/gmb/post', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gmbapi.com/external-api/gmb/post",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'location_id' => '<string>',
'params' => [
'languageCode' => '<string>',
'summary' => '<string>',
'callToAction' => [
'url' => '<string>'
],
'media' => [
[
'sourceUrl' => '<string>'
]
],
'event' => [
'title' => '<string>',
'schedule' => [
'startDate' => [
'year' => 123,
'month' => 123,
'day' => 123
],
'startTime' => [
'hours' => 123,
'minutes' => 123,
'seconds' => 123
],
'endDate' => [
'year' => 123,
'month' => 123,
'day' => 123
],
'endTime' => [
'hours' => 123,
'minutes' => 123,
'seconds' => 123
]
]
],
'offer' => [
'couponCode' => '<string>',
'redeemOnlineUrl' => '<string>',
'termsConditions' => '<string>'
],
'scheduledTime' => '2023-11-07T05:31:56Z'
],
'use_location_website_url' => true,
'parameterMask' => '<string>',
'parameters' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gmbapi.com/external-api/gmb/post"
payload := strings.NewReader("{\n \"location_id\": \"<string>\",\n \"params\": {\n \"languageCode\": \"<string>\",\n \"summary\": \"<string>\",\n \"callToAction\": {\n \"url\": \"<string>\"\n },\n \"media\": [\n {\n \"sourceUrl\": \"<string>\"\n }\n ],\n \"event\": {\n \"title\": \"<string>\",\n \"schedule\": {\n \"startDate\": {\n \"year\": 123,\n \"month\": 123,\n \"day\": 123\n },\n \"startTime\": {\n \"hours\": 123,\n \"minutes\": 123,\n \"seconds\": 123\n },\n \"endDate\": {\n \"year\": 123,\n \"month\": 123,\n \"day\": 123\n },\n \"endTime\": {\n \"hours\": 123,\n \"minutes\": 123,\n \"seconds\": 123\n }\n }\n },\n \"offer\": {\n \"couponCode\": \"<string>\",\n \"redeemOnlineUrl\": \"<string>\",\n \"termsConditions\": \"<string>\"\n },\n \"scheduledTime\": \"2023-11-07T05:31:56Z\"\n },\n \"use_location_website_url\": true,\n \"parameterMask\": \"<string>\",\n \"parameters\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gmbapi.com/external-api/gmb/post")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"location_id\": \"<string>\",\n \"params\": {\n \"languageCode\": \"<string>\",\n \"summary\": \"<string>\",\n \"callToAction\": {\n \"url\": \"<string>\"\n },\n \"media\": [\n {\n \"sourceUrl\": \"<string>\"\n }\n ],\n \"event\": {\n \"title\": \"<string>\",\n \"schedule\": {\n \"startDate\": {\n \"year\": 123,\n \"month\": 123,\n \"day\": 123\n },\n \"startTime\": {\n \"hours\": 123,\n \"minutes\": 123,\n \"seconds\": 123\n },\n \"endDate\": {\n \"year\": 123,\n \"month\": 123,\n \"day\": 123\n },\n \"endTime\": {\n \"hours\": 123,\n \"minutes\": 123,\n \"seconds\": 123\n }\n }\n },\n \"offer\": {\n \"couponCode\": \"<string>\",\n \"redeemOnlineUrl\": \"<string>\",\n \"termsConditions\": \"<string>\"\n },\n \"scheduledTime\": \"2023-11-07T05:31:56Z\"\n },\n \"use_location_website_url\": true,\n \"parameterMask\": \"<string>\",\n \"parameters\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gmbapi.com/external-api/gmb/post")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"location_id\": \"<string>\",\n \"params\": {\n \"languageCode\": \"<string>\",\n \"summary\": \"<string>\",\n \"callToAction\": {\n \"url\": \"<string>\"\n },\n \"media\": [\n {\n \"sourceUrl\": \"<string>\"\n }\n ],\n \"event\": {\n \"title\": \"<string>\",\n \"schedule\": {\n \"startDate\": {\n \"year\": 123,\n \"month\": 123,\n \"day\": 123\n },\n \"startTime\": {\n \"hours\": 123,\n \"minutes\": 123,\n \"seconds\": 123\n },\n \"endDate\": {\n \"year\": 123,\n \"month\": 123,\n \"day\": 123\n },\n \"endTime\": {\n \"hours\": 123,\n \"minutes\": 123,\n \"seconds\": 123\n }\n }\n },\n \"offer\": {\n \"couponCode\": \"<string>\",\n \"redeemOnlineUrl\": \"<string>\",\n \"termsConditions\": \"<string>\"\n },\n \"scheduledTime\": \"2023-11-07T05:31:56Z\"\n },\n \"use_location_website_url\": true,\n \"parameterMask\": \"<string>\",\n \"parameters\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"payload": {
"id": "abc123",
"post_id": null,
"location_id": "12654275338176815409",
"account": "108234567890123456789",
"state": "SENDING",
"source": "external_api",
"create_time": 1756368000000,
"published_time": 1756368000000,
"update_time": null,
"scheduled_time": null,
"search_url": null,
"last_error": null,
"params": {
"languageCode": "en",
"summary": "Grand opening deals in New York this week only!",
"topicType": "STANDARD",
"callToAction": {
"actionType": "LEARN_MORE",
"url": "https://example.com/deals"
}
}
}
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"success": false,
"msg": "RATE_LIMIT_EXCEEDED",
"payload": {
"allowed": false,
"limit": 200,
"remaining": 0,
"retryAfter": 123
}
}202 with state: SENDING. Poll Get Post until a terminal state.
The location must belong to the account and be connected to Google.
Optional Idempotency-Key: the same key + account returns the existing post instead of creating a duplicate.
params.scheduledTime (RFC 3339, must be in the future) schedules the post with Google. Recurring posts are not supported.
parameterMask replaces {placeholder} tokens in params.summary with values from parameters. When use_location_website_url is true, the call-to-action URL is taken from the location’s website.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Optional. Same key + account returns the existing post instead of creating a duplicate.
Query Parameters
Account ID. Required when using an organization token; ignored for account-level tokens.
Body
Location that will receive the post. Must belong to the caller and be connected to Google.
Google Business Profile LocalPost body. See Google's Local Posts API for field constraints per topicType.
Show child attributes
Show child attributes
When true, the call-to-action URL is taken from the location's website. Returns 400 if the location has no website.
Comma-separated placeholder names replaced in params.summary, e.g. city,name.
Values for parameterMask placeholders.
Show child attributes
Show child attributes