# Publish to Google Business Profile with the API
URL: https://skedcast.com/developers/guides/publish-to-google-business-api

A Google Business Profile post goes out with the same POST /v1/posts call as every other platform. The google_business overrides choose the post type (a "What's new" update, an event or an offer), add event dates and offer details, and add a button.

## What do you need before you publish?
You need one connected account for the platform. Connect it in the SkedCast console. If a client owns the account, create a connect link with `POST /v1/clients/{id}/connect-invites` and send it to them. They authorize from that page without a SkedCast login.
`GET /v1/accounts` lists the connected accounts with their ids. Pass that id in `targets.accountIds` below.

## How do you schedule a Google Business Profile post with the API?
```bash
curl -X POST https://api.skedcast.com/v1/posts \
  -H "Authorization: Bearer sked_live_YOUR_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "clientId": "<clientId>",
    "content": "Launch day is here 🚀",
    "mediaIds": ["<mediaAssetId>"],
    "targets": { "mode": "selection", "accountIds": ["<google_businessAccountId>"] },
    "schedule": { "type": "at", "scheduledAt": "2030-01-15T15:00:00Z" }
  }'
```

## Which Google Business Profile fields can you set?
Put everything platform-specific in one `variants` entry with `"platform": "google_business"` and an `overrides` object. Send only `google_business` keys on a `google_business` variant. SkedCast reads the keys in the table below and ignores the rest.

## Reference
Field | Type | Values / default | Notes
`topicType` | enum | `STANDARD` (default) \| `EVENT` \| `OFFER` | The post type: a "What's new" update, an event or an offer.
`eventTitle` | string | — | Required for `EVENT` and `OFFER`: the event or offer title.
`eventStart`, `eventEnd` | `YYYY-MM-DD` or `YYYY-MM-DDTHH:MM` | — | Required for `EVENT` and `OFFER`. The end must not be before the start.
`offerCouponCode`, `offerRedeemUrl`, `offerTerms` | string | — | `OFFER` only: a coupon code, an http(s) link to redeem online, and the terms. On another post type they are not sent, with a warning.
`callToAction` | enum | `BOOK` \| `ORDER` \| `SHOP` \| `LEARN_MORE` \| `SIGN_UP` \| `CALL` | Optional button. `CALL` uses the phone number on the profile and takes no link.
`callToActionUrl` | string (https url) | — | Required with every button except `CALL`: where the button goes.

## Unknown keys are ignored without an error
A misspelled or unknown key in `overrides` is not an error and not a warning. It is dropped, so check the field names in the table above, especially a required one.
A YouTube-only key (such as `privacyStatus`, `captions` or `chapters`) sent on another platform's variant is ignored and returns an `override_key_wrong_platform` warning.

## How do you add Google Business Profile-specific settings?
```json
{
  "clientId": "<clientId>",
  "content": "Two-for-one cinnamon buns all week.",
  "mediaIds": ["<photoAssetId>"],
  "targets": { "mode": "selection", "accountIds": ["<googleBusinessAccountId>"] },
  "variants": [
    {
      "platform": "google_business",
      "overrides": {
        "topicType": "OFFER",
        "eventTitle": "Two-for-one cinnamon buns",
        "eventStart": "2030-01-15",
        "eventEnd": "2030-01-21",
        "offerCouponCode": "BUNS2",
        "callToAction": "ORDER",
        "callToActionUrl": "https://example.com/order"
      }
    }
  ],
  "schedule": { "type": "at", "scheduledAt": "2030-01-15T15:00:00Z" }
}
```

## How do you check that the post published?
Publishing creates one post target per account. `GET /v1/post-targets/{id}` (or `GET /v1/posts/{id}`) reports `status`, plus `externalId` (Google Business Profile's own post id) and `permalink` (its public URL) once published. To avoid polling, subscribe to the `target.published` and `target.failed` webhooks (see the webhooks guide).

## FAQ
**Q: Can a Google Business Profile post include a video or several photos?**
A: No. A post carries at most one photo, JPG or PNG, and a "What's new" post can be text only. The text is up to 1,500 characters.

**Q: Does Google Business Profile support a first comment?**
A: No. Google Business Profile posts have no comments, so firstComment is not used for this platform.
