POSTapi.synup.com/api/v4/posts
Create a post
Creates a Google Business Profile post for one or more locations.
The post shape is selected by input.postType. See the Announcement, Event and Offer references for the fields each type accepts.
Requires an API key. Send it as
Authorization: API <your-key> — see Getting started.Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type | string | required |
Body
| Name | Type | Required | Description |
|---|---|---|---|
input | one of | required |
input: ANNOUNCEMENT
| Name | Type | Required | Description |
|---|---|---|---|
input.postName | string | required | |
input.locationIds | array of string | required | |
input.postType | string | required | |
input.postSites | array of string | required | |
input.postMessage | array of object | required | |
input.postMessage[].site | string | optional | |
input.postMessage[].message | string | optional |
input: EVENT
| Name | Type | Required | Description |
|---|---|---|---|
input.postName | string | required | |
input.locationIds | array of string | required | |
input.postType | string | required | |
input.postSites | array of string | required | |
input.postMessage | array of object | required | |
input.postMessage[].site | string | optional | |
input.postMessage[].message | string | optional | |
input.postContextInfo | object | required | |
input.postContextInfo.title | string | required | |
input.postContextInfo.startDay | string | required | |
input.postContextInfo.startTime | string | required | |
input.postContextInfo.endDay | string | required | |
input.postContextInfo.endTime | string | required |
input: OFFER
| Name | Type | Required | Description |
|---|---|---|---|
input.postName | string | required | |
input.locationIds | array of string | required | |
input.postType | string | required | |
input.postSites | array of string | required | |
input.postMessage | array of object | required | |
input.postMessage[].site | string | optional | |
input.postMessage[].message | string | optional | |
input.postContextInfo | object | required | |
input.postContextInfo.title | string | required | |
input.postContextInfo.couponCode | string | required | |
input.postContextInfo.redeemUrl | string | required | |
input.postContextInfo.termsConditions | string | required | |
input.postContextInfo.startDay | string | required | |
input.postContextInfo.startTime | string | required | |
input.postContextInfo.endDay | string | required | |
input.postContextInfo.endTime | string | required | |
input.postCta | array of object | required | |
input.postCta[].site | string | optional | |
input.postCta[].type | string | optional | |
input.postCta[].url | string | optional |
Request
Request
curl -X POST 'https://api.synup.com/api/v4/posts' \
-H 'Authorization: API YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"input": {
"postName": "Grand Opening Announcement",
"locationIds": [
"{locationId}"
],
"postType": "ANNOUNCEMENT",
"postSites": [
"GOOGLE"
],
"postMessage": [
{
"site": "GOOGLE",
"message": "We are now open!"
}
]
}
}'const res = await fetch('https://api.synup.com/api/v4/posts', {
method: 'POST',
headers: {
Authorization: 'API YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"input": {
"postName": "Grand Opening Announcement",
"locationIds": [
"{locationId}"
],
"postType": "ANNOUNCEMENT",
"postSites": [
"GOOGLE"
],
"postMessage": [
{
"site": "GOOGLE",
"message": "We are now open!"
}
]
}
}),
});
const data = await res.json();import requests
res = requests.post(
"https://api.synup.com/api/v4/posts",
headers={
"Authorization": "API YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"input": {
"postName": "Grand Opening Announcement",
"locationIds": [
"{locationId}"
],
"postType": "ANNOUNCEMENT",
"postSites": [
"GOOGLE"
],
"postMessage": [
{
"site": "GOOGLE",
"message": "We are now open!"
}
]
}
},
)
data = res.json()req, _ := http.NewRequest("POST", "https://api.synup.com/api/v4/posts", bytes.NewBufferString(payload))
req.Header.Set("Authorization", "API YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)Responses
| Status | Description |
|---|---|
200 |
Example response (generated from the schema)
{}