Docs

Invite customers to review

Preview· P9
POST
/review-invitations

Invites customers to review a branch on Agoo Reviews, after a sale in your own system. Each needs an email address or a Ghanaian mobile number. They go at once (outside your quiet hours) on your organisation's channels, and the reviews they lead to are labelled Invited. Repeats within 90 days, people who asked not to be invited and your organisation's own people are left out, with why, in left_out.

Invite every customer, never a chosen few: declared must be true. Invitations to people who checked in or booked go automatically from Agoo itself (labelled Verified visit) when your organisation turns them on.

Scope: reviews:invite · Plan: Growth, Pro and Enterprise in live mode; every plan in test mode.

Authorization

headerAuthorizationBearer <token>

Send Authorization: Bearer <token> on every request. The token is one of:

PrefixWhat it isWhere it may be used
agoo_sk_live_Secret key, live modeYour servers only
agoo_sk_test_Secret key, test modeYour servers only
agoo_pk_live_Publishable key, live modeBrowsers and apps: create pre-registrations and bookings, read public booking types (with their intake questions) and their free slots, read the visit types open for pre-registration with their public forms. Never lists people.
agoo_pk_test_Publishable key, test modeAs above, in test mode

Admins create keys in Console → Developers → API keys and choose each key's scopes. A key is shown once. Never put a secret key in a URL, a browser or a mobile app.

Scope: reviews:invite

Header Parameters

Idempotency-Key*string

A UUID you generate for this operation. If you retry with the same key within 24 hours, Agoo returns the original response instead of acting twice. While the first request is still running, a retry returns conflict. Reusing a key with a different request returns idempotency_key_reused. Responses with rate_limited, internal_error or unavailable aren't stored, so retry those with the same key.

Formatuuid

Request Body

application/json
  1. body
place_id*ReviewPlaceId

A branch's ID on Agoo Reviews (TypeID with the rplace prefix): one of your sites, as a page shows it.

Match^rplace_[0-7][0-9a-hjkmnp-tv-z]{25}$
Example"rplace_01m6a2b3c4d5e6f7g8h9jkmnpq"
customers*array<>
Items1 <= items <= 500
declared*boolean

You're inviting every customer, never choosing by what they might say. Must be true.

Response Body

The invitations, queued.

application/json
  1. response
id*string

TypeID with the rbatch prefix.

object*"review_invitation_batch"
Value in"review_invitation_batch"
rows_in*integer
invited*integer
left_out*

Customers not invited, by why: no_contact, staff, stopped, asked_recently, no_channel, quota.

curl -X POST 'https://api.agoo.ardent.africa/v1/review-invitations' \  -H 'Idempotency-Key: 3f6b2a1e-8c4d-4f7a-9b2e-5d1c0a7e9f64' \  -H 'Content-Type: application/json' \  -d '{  "place_id": "rplace_01m6a2b3c4d5e6f7g8h9jkmnpq",  "customers": [    {      "name": "Esi Owusu",      "email": "esi.owusu@example.com"    },    {      "name": "Kwabena Asare",      "phone": "+233245550191"    }  ],  "declared": true}'
{  "id": "string",  "object": "review_invitation_batch",  "rows_in": 0,  "invited": 0,  "left_out": {    "property1": 0,    "property2": 0  }}