cURL
curl --request PATCH \
--url https://api.gmbapi.com/external-api/gmb/post/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"updateMask": "<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"
}
}
'import requests
url = "https://api.gmbapi.com/external-api/gmb/post/{id}"
payload = {
"updateMask": "<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"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
updateMask: '<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'
}
})
};
fetch('https://api.gmbapi.com/external-api/gmb/post/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'updateMask' => '<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'
]
]),
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/{id}"
payload := strings.NewReader("{\n \"updateMask\": \"<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}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.gmbapi.com/external-api/gmb/post/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"updateMask\": \"<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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gmbapi.com/external-api/gmb/post/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"updateMask\": \"<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}"
response = http.request(request)
puts response.read_body{
"success": true,
"payload": {
"id": "<string>",
"post_id": "<string>",
"location_id": "<string>",
"account": "<string>",
"state": "SENDING",
"source": "app",
"create_time": 123,
"published_time": 123,
"update_time": 123,
"scheduled_time": 123,
"search_url": "<string>",
"last_error": {
"status": 123,
"reason": "<string>",
"message": "<string>",
"details": [
"<unknown>"
],
"at": 123
},
"params": {
"languageCode": "<string>",
"summary": "<string>",
"topicType": "STANDARD",
"callToAction": {
"actionType": "BOOK",
"url": "<string>"
},
"media": [
{
"mediaFormat": "PHOTO",
"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",
"alertType": "ALERT_TYPE_UNSPECIFIED"
}
}
}{
"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
}
}Posts
Update Post
Updates a post. Returns 202 with state SENDING. Poll GET /post/{id} until a terminal state. Cannot update a DELETED post or one still SENDING without a post_id.
PATCH
/
post
/
{id}
cURL
curl --request PATCH \
--url https://api.gmbapi.com/external-api/gmb/post/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"updateMask": "<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"
}
}
'import requests
url = "https://api.gmbapi.com/external-api/gmb/post/{id}"
payload = {
"updateMask": "<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"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
updateMask: '<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'
}
})
};
fetch('https://api.gmbapi.com/external-api/gmb/post/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'updateMask' => '<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'
]
]),
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/{id}"
payload := strings.NewReader("{\n \"updateMask\": \"<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}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.gmbapi.com/external-api/gmb/post/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"updateMask\": \"<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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gmbapi.com/external-api/gmb/post/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"updateMask\": \"<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}"
response = http.request(request)
puts response.read_body{
"success": true,
"payload": {
"id": "<string>",
"post_id": "<string>",
"location_id": "<string>",
"account": "<string>",
"state": "SENDING",
"source": "app",
"create_time": 123,
"published_time": 123,
"update_time": 123,
"scheduled_time": 123,
"search_url": "<string>",
"last_error": {
"status": 123,
"reason": "<string>",
"message": "<string>",
"details": [
"<unknown>"
],
"at": 123
},
"params": {
"languageCode": "<string>",
"summary": "<string>",
"topicType": "STANDARD",
"callToAction": {
"actionType": "BOOK",
"url": "<string>"
},
"media": [
{
"mediaFormat": "PHOTO",
"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",
"alertType": "ALERT_TYPE_UNSPECIFIED"
}
}
}{
"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
}
}Updates a post using Google
updateMask semantics (only masked fields change). Returns 202 with state: SENDING. Poll Get Post until a terminal state.
Cannot update a DELETED post or one still SENDING without a post_id.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Post id
Query Parameters
Account ID. Required when using an organization token; ignored for account-level tokens.
Body
application/json