Updated Oct 2026
How to Reply to Google Reviews via API (Code, Templates and AI With Human Review)
To reply to Google reviews via API, send a PUT request to https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/reviews/{reviewId}/reply with the body {"comment": "your reply"}. The same call creates a reply or edits an existing one, and a DELETE on the same URL removes it. Replies can be up to 4096 bytes and go through Google’s moderation: check reviewReplyState to see if yours is PENDING, APPROVED or REJECTED. You need approved Business Profile API access and owner or manager rights on the location.
Before you start
- API access. Your Google Cloud project must be approved for the Business Profile APIs. If your quota shows 0 QPM, get API access first.
- OAuth scope.
https://www.googleapis.com/auth/business.manage, granted by an owner or manager of the profile. - Google Workspace accounts. Google notes that an admin must have enabled Google Search and/or Google Maps, along with Business Profile, for the reply call to work.
- IDs. You need the account ID, the location ID and the review ID. The review ID comes from
reviews.list.
Replies live in the older v4 surface of the Google Business Profile API. The official references are Work with review data and the reviews resource.
How to reply to Google reviews via API, step by step
Step 1 — List the reviews that need a reply
reviews.list returns up to 50 reviews per page, most recently updated first by default. A review without a reviewReply field has no answer yet.
curl -H "Authorization: Bearer ACCESS_TOKEN" \
"https://mybusiness.googleapis.com/v4/accounts/ACCOUNT_ID/locations/LOCATION_ID/reviews?pageSize=50"Each review includes reviewId, reviewer, starRating (ONE to FIVE), comment, createTime, updateTime and, if answered, reviewReply.
Step 2 — Send the reply (updateReply)
curl -X PUT \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Content-Type: application/json" \
"https://mybusiness.googleapis.com/v4/accounts/ACCOUNT_ID/locations/LOCATION_ID/reviews/REVIEW_ID/reply" \
-d '{"comment": "Thanks, Laura! Glad the new terrace worked for your team dinner. See you soon — Marta, Manager"}'// Node 18+
async function replyToReview({ accountId, locationId, reviewId, comment, token }) {
if (Buffer.byteLength(comment, "utf8") > 4096) throw new Error("Reply exceeds 4096 bytes");
const url = `https://mybusiness.googleapis.com/v4/accounts/${accountId}/locations/${locationId}/reviews/${reviewId}/reply`;
const res = await fetch(url, {
method: "PUT",
headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json" },
body: JSON.stringify({ comment }),
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
return res.json(); // the ReviewReply
}# Python 3
import requests
def reply_to_review(account_id, location_id, review_id, comment, token):
if len(comment.encode("utf-8")) > 4096:
raise ValueError("Reply exceeds 4096 bytes")
url = (f"https://mybusiness.googleapis.com/v4/accounts/{account_id}"
f"/locations/{location_id}/reviews/{review_id}/reply")
r = requests.put(url, json={"comment": comment},
headers={"Authorization": f"Bearer {token}"})
r.raise_for_status()
return r.json()The limit is in bytes, not characters. A reply in Japanese or with emoji reaches 4096 bytes much sooner than one in English.
Step 3 — Check moderation
Get the review again and read reviewReply.reviewReplyState:
| State | Meaning | What to do |
|---|---|---|
PENDING | Under moderation | Check again later |
APPROVED | Published | Nothing; store the final text for your records |
REJECTED | Not published | Read policyViolation, rewrite, send again |
Step 4 — Edit or delete
To edit, send updateReply again with the new text. To remove the reply:
curl -X DELETE -H "Authorization: Bearer ACCESS_TOKEN" \
"https://mybusiness.googleapis.com/v4/accounts/ACCOUNT_ID/locations/LOCATION_ID/reviews/REVIEW_ID/reply"Step 5 — Get new reviews as they arrive
Don’t poll every location. Subscribe to NEW_REVIEW and UPDATED_REVIEW events through the Notifications API and Cloud Pub/Sub (notification setup), then fetch only the review that changed. It saves quota and gets your reply out faster.
Google review reply templates by star rating
Templates are a starting point, not the reply. Always add one specific detail from the review and sign with a real name. Fill in the parts in brackets.
5 stars, with text
Thank you, [first name]! We’re glad you enjoyed [specific thing they mentioned]. [team member] will be happy to hear it. See you next time. — [your name], [role]
5 stars, rating only
Thanks for the 5 stars, [first name]. It means a lot to the team at [location]. — [your name]
4 stars
Thanks, [first name]. Happy you liked [positive detail]. You mentioned [small issue]; we’ve [concrete action] so it’s better next time. — [your name]
3 stars
Thanks for the honest review, [first name]. [positive detail] is what we aim for, and [issue] isn’t. We’re [concrete action]. If you’d like to tell us more, write to [email]. — [your name], [role]
1–2 stars, service issue
[first name], I’m sorry about [issue]. That’s not the standard we set at [location]. I’d like to understand what happened: please email me at [email] or call [phone]. — [your name], [role]
1–2 stars, you can’t find the customer
Hi [first name], we can’t find a visit matching your description and would like to look into it. Could you contact us at [email] with the date of your visit? — [your name], [role]
Review in another language
Reply in the reviewer’s language. If no one on the team writes it, keep it short and correct rather than long and machine-translated.
Updated review (rating went up)
Thanks for updating your review, [first name]. Glad [fix] made a difference. — [your name]
Never include order numbers, health details, booking data or anything else that identifies the customer. Replies are public.
AI review response with human review
An AI review response workflow drafts replies with a language model and lets a person approve them before they’re published. It cuts writing time without letting a model speak for your brand on its own. The model is yours: any LLM works, and the API (or Prisma) only publishes the final text you send.
The flow: a NEW_REVIEW event arrives through Pub/Sub, a classifier looks at the rating and sensitive keywords, the model writes a draft, a person approves or edits it in a queue, your code sends updateReply, and a final check reads reviewReplyState.
Route by risk, not by volume
| Review type | AI draft | Human step |
|---|---|---|
| 5★ with text | Yes | Batch approval |
| 5★ rating only | Template, no AI needed | Optional |
| 4★ | Yes | Approve each |
| 3★ | Yes | Edit and approve |
| 1–2★ | Yes, as a starting point | Manager writes the final version |
| Mentions refund, injury, health, legal, staff by name | Yes | Always a manager |
Guardrails for the model
- Give it the review text, rating, location name and your tone guide. Nothing else.
- Forbid promises: no refunds, discounts or “we’ve fired the employee” unless a human adds them.
- Reply in the review’s language and stay well under 4096 bytes. Two to four sentences is enough.
- Never repeat personal data from the review.
- Keep a log of draft, editor and final text for every reply.
// Node — draft, queue for approval, publish on approve
// generateDraft() and approvalQueue are yours: any LLM and any queue work.
async function handleNewReview(review) {
const risky = ["ONE", "TWO"].includes(review.starRating) ||
/refund|injur|sick|lawyer|police/i.test(review.comment ?? "");
const draft = await generateDraft({ // your LLM call
rating: review.starRating,
text: review.comment ?? "",
rules: "2-4 sentences, reviewer's language, no promises, no personal data, sign as the manager",
});
await approvalQueue.add({ reviewName: review.name, draft, needsManager: risky });
}
async function onApproved({ reviewName, finalText }) {
const [, accountId, , locationId, , reviewId] = reviewName.split("/");
await replyToReview({ accountId, locationId, reviewId, comment: finalText, token });
}Common errors
| Error | Cause | Fix |
|---|---|---|
404 | Wrong name format, or locations/{id} from the newer APIs | Use accounts/{a}/locations/{l}/reviews/{r} |
400 | Reply over 4096 bytes, or empty | Trim and count bytes |
403 | Missing scope or Workspace settings | Re-consent with business.manage; ask the Workspace admin |
429 | Over quota | Back off and queue |
REJECTED state | Reply broke a content policy | Read policyViolation, rewrite |
FAQ
Can you reply to Google reviews via API?
Yes. updateReply creates or edits a reply and deleteReply removes it. You need approved Business Profile API access and owner or manager rights on the profile.
How long can a Google review reply be?
Up to 4096 bytes. Non-Latin characters and emoji use more than one byte each, so count bytes, not characters.
Can I reply to reviews of a business I don’t manage?
No. The API only works on profiles you own or manage.
Can I delete a customer’s review through the API?
No. The v4 reviews resource only has list, get, updateReply and deleteReply, so you can reply, edit and delete your own reply. A review that breaks Google’s policies has to be reported to Google outside the API.
Why was my review reply rejected?
Replies go through moderation. When reviewReplyState is REJECTED, the policyViolation field says which policy the reply broke. Rewrite it and send updateReply again.
Is it OK to use AI to reply to Google reviews?
Every reply goes through the same moderation, however it was written. Use AI to draft, keep a human approval step for negative or sensitive reviews, and never let the model invent facts or offers.
Skip all this with Prisma
Prisma gives you one reply endpoint for the Google reviews API, Trustpilot, App Store and Google Play. You send the reply text, written by you, your software or your own AI, and Prisma publishes it unchanged. A review.created webhook tells you when a new review arrives; a reply.published webhook tells you when it's live, and reply.failed when it isn't. Prisma connects Google with its own Cloud project, so you don't file an access form: you connect your locations through OAuth as owner or manager.
curl -X POST "https://api.prismareviews.com/v1/reviews/rev_8f3k2/reply" \
-H "Authorization: Bearer $PRISMA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "Thanks, Laura! Glad the new terrace worked for your team dinner. — Marta"}'The reply is queued (202) and published through Google's official API. Building a full workflow? See Google review management. Your first 2 locations are free, then plans from €49 a month: see pricing.
Reply to Google, Trustpilot, App Store and Google Play reviews from one API. First 2 locations free.