# Google Business Profile API: Posting Reference

Google Business is supported via the Google Business Profile API. OmniSocials publishes "local posts" (the short updates that appear on your Google Business Profile) to a specific business location, which the workspace owner selects when connecting the account.

**Channel ID:** `google_business`

## Supported content types

| Type | Supported | Notes |
|------|-----------|-------|
| Local post (feed post) | ✅ | Text-only, or text + a single image, with an optional call-to-action button |
| Story | — | Not supported by Google Business |
| Reel | — | Not supported by Google Business |

## Minimal example

```bash
curl -X POST https://api.omnisocials.com/v1/posts/create \
  -H "Authorization: Bearer $OMNISOCIALS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": { "default": "Spring sale — 20% off everything until Sunday." },
    "accounts": ["your-google-business-account-id"],
    "media_urls": ["https://example.com/sale-banner.jpg"]
  }'
```

Media is optional. A caption-only post is a valid Google Business post.

## Caption rules

Google Business rejects posts whose caption contains a phone number or a URL — the API returns a generic 400 with no specific field, so a post that contains either silently fails at publish time. OmniSocials catches this at scheduling and returns a `validation_error` 400 with a clear message so you can fix the input before saving the post.

| Rule | Why |
|------|-----|
| **No phone numbers in the caption.** Put the phone number on a `CALL` CTA button instead — Google uses the phone number from your Business Profile automatically. | Google's content policy. |
| **No inline URLs, bare domains, or email addresses in the caption.** Put the link on a `LEARN_MORE`, `BOOK`, `SHOP`, `SIGN_UP`, or `ORDER` CTA button instead. | Google's content policy. |
| **Caption max 1500 characters.** | Google's hard limit. |
| **A Google Business location must be selected on the workspace** (Settings → Organisation → Workspaces → Google Business). | Local posts target a single location; we surface this at scheduling instead of failing hours later at publish. |

## Media requirements

| Media | Requirement |
|-------|-------------|
| Image | JPEG, PNG, or WebP. 10 KB to 5 MB. Recommended 720 × 540 minimum, 4:3 aspect ratio. |
| Video | Not supported. Google Business has been quietly disabling video on local posts; passing a video URL is rejected at scheduling with a 400. |

Google Business local posts accept **at most one** image per post. Posts with multiple media URLs (carousels) are rejected — only one image fits in a local post's Google Business UI.

## Post types

Google Business supports three post types beyond a plain caption. Pass `google_business.topic_type` to switch — `STANDARD` is the default.

### Call-to-action button (works on every post type)

Add a button rendered under the caption. `actionType` is required; `url` is required for every value except `CALL` (which uses the location's phone number from the business profile).

```bash
curl -X POST https://api.omnisocials.com/v1/posts/create \
  -H "Authorization: Bearer $OMNISOCIALS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": { "default": "Spring sale — 20% off everything until Sunday." },
    "accounts": ["your-google-business-account-id"],
    "media_urls": ["https://example.com/sale-banner.jpg"],
    "google_business": {
      "cta": { "actionType": "LEARN_MORE", "url": "https://example.com/sale" }
    }
  }'
```

`actionType` enum: `LEARN_MORE` · `BOOK` · `ORDER` · `SHOP` · `SIGN_UP` · `CALL`.

### EVENT posts

```bash
curl -X POST https://api.omnisocials.com/v1/posts/create \
  -H "Authorization: Bearer $OMNISOCIALS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": { "default": "Join us for our grand opening." },
    "accounts": ["your-google-business-account-id"],
    "google_business": {
      "topic_type": "EVENT",
      "event": {
        "title": "Grand opening",
        "schedule": {
          "startDate": { "year": 2026, "month": 6, "day": 1 },
          "startTime": { "hours": 14, "minutes": 0 },
          "endDate":   { "year": 2026, "month": 6, "day": 1 },
          "endTime":   { "hours": 18, "minutes": 0 }
        }
      }
    }
  }'
```

`event.title` is required (max 58 chars). `schedule.startDate` is required; `endDate` (if present) must be ≥ `startDate`.

### OFFER posts

```bash
curl -X POST https://api.omnisocials.com/v1/posts/create \
  -H "Authorization: Bearer $OMNISOCIALS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": { "default": "Spring sale — 20% off your first order" },
    "accounts": ["your-google-business-account-id"],
    "google_business": {
      "topic_type": "OFFER",
      "offer": {
        "couponCode": "SPRING20",
        "redeemOnlineUrl": "https://example.com/spring",
        "termsConditions": "Valid through June 30. One per customer."
      }
    }
  }'
```

Must include at least one of `couponCode` (max 58 chars) or `redeemOnlineUrl` (must be HTTPS). `termsConditions` is optional, max 4000 chars.

## Limitations

- **Per-post analytics are not available.** Google deprecated per-post insights on local posts. The OmniSocials analytics API returns zeroed metrics for individual Google Business posts with an explanatory `note` field.
- **Account-level metrics are available** via Google's Performance API: impressions (split across Desktop / Mobile, Maps / Search), direction requests, calls, and website clicks. These appear on the account analytics endpoint and the analytics page in the dashboard, aggregated over the last 30 days.
- **No follower concept.** Google Business does not expose a follower count. The `followers` field on the account analytics endpoint is always `0`.
- **Location-bound.** Posts target the single location selected during connection. To post to multiple locations, connect each location as a separate workspace.
- **Posts disappear after 6 months.** This is a Google Business product behavior — local posts age out of the profile after roughly 6 months. OmniSocials still has the original post record in your post history.

## Connecting

Connect Google Business via **Settings → Organisation → Workspaces → connect Google Business** in the OmniSocials dashboard. The OAuth flow is followed by a location picker — you choose which business location the workspace publishes to. The workspace cannot schedule Google Business posts until a location is selected.

If you manage multiple Google Business locations, you can connect each one to a separate OmniSocials workspace and switch between them via the workspace selector.
