Developer API
API Reference
Manage review links, pull AI-written review scripts and read your review funnel from your own POS, CRM or scripts. Everything the dashboard does, your code can do.
Base URL
https://www.cooperfile.com/api/v1Authentication
Create a key in Dashboard → Developers. The full key is shown once at creation and stored only as a hash, so it cannot be recovered later — issue a new one if you lose it.
Send it as a bearer token on every request:
curl https://www.cooperfile.com/api/v1/links \
-H "Authorization: Bearer cf_live_your_key_here"Keys carry scopes: links:read, links:write, reviews:read, reviews:write and analytics:read. A request using a key without the required scope returns 403.
Endpoints
| Method | Path | Scope | Description |
|---|---|---|---|
| GET | /api/v1/links | links:read | List every review link on your account. |
| POST | /api/v1/links | links:write | Create a review link and get its public URL back. |
| GET | /api/v1/links/{id} | links:read | Fetch a single review link. |
| PATCH | /api/v1/links/{id} | links:write | Update a link. Omitted fields keep their current value. |
| DELETE | /api/v1/links/{id} | links:write | Delete a link and its review scripts. |
| GET | /api/v1/links/{id}/reviews | reviews:read | List review scripts. Filter with ?category= and ?limit=. |
| POST | /api/v1/links/{id}/reviews/generate | reviews:write | Regenerate the review bank with AI. Limited to 10 calls per hour. |
| GET | /api/v1/analytics/links/{id} | analytics:read | Daily views, Google clicks and click-through rate. ?from= &to=. |
Create a review link
curl -X POST https://www.cooperfile.com/api/v1/links \
-H "Authorization: Bearer cf_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"business_name": "Sunrise Enterprises",
"city": "Patna",
"district": "Patna",
"state": "Bihar",
"pincode": "800001",
"sector": "Retail Shop",
"google_review_link": "https://g.page/r/your-place-id/review"
}'Returns the new link and its public review URL:
{
"id": "66b1f0c2e4b0a1d2c3e4f5a6",
"slug": "sunrise-enterprises-patna",
"review_url": "https://www.cooperfile.com/review/sunrise-enterprises-patna",
"business_name": "Sunrise Enterprises",
"city": "Patna"
}Only business_name, city and google_review_link are required. Leave sector out and it is detected from the business name.
Read your funnel
curl "https://www.cooperfile.com/api/v1/analytics/links/{id}?from=2026-07-01" \
-H "Authorization: Bearer cf_live_your_key_here"{
"link_id": "66b1f0c2e4b0a1d2c3e4f5a6",
"totals": {
"views": 230,
"clicks": 85,
"click_through_rate": 0.3696,
"lifetime_views": 230,
"lifetime_clicks": 85
},
"daily": [{ "date": "2026-07-01", "views": 12, "clicks": 5 }]
}Embed a review QR on your website
Paste one tag where you want the QR to appear. No API key, no build step, no dependencies:
<script src="https://www.cooperfile.com/embed.js"
data-cooperfile="your-review-link-slug"></script>The slug is the last part of your review URL — https://www.cooperfile.com/review/your-review-link-slug.
Use the slug, never an API key. Anything in a public page is visible to every visitor, so a key pasted here could be used to create or delete links on your account. The slug is public by design and grants nothing beyond the review page itself.
Optional attributes:
data-theme="dark" light | dark (default light)
data-size="240" QR size in px (default 200)
data-layout="qr" card | qr | button (default card)
data-title="Loved it?" heading override
data-target="#review-box" render into this element insteadWant the QR without the widget? The image is a plain URL you can use in an <img>, an email, or a print file:
https://www.cooperfile.com/api/embed/{slug}/qr?size=400&dark=0d9488It returns SVG, so it stays sharp at any size including print. Both embed endpoints are keyless, CORS-open and edge-cached. An expired link renders nothing rather than a dead QR.
Errors
Every error uses the same shape, so you only parse one:
{ "error": { "type": "not_found", "message": "No review link with that id." } }Types: unauthorized (401), forbidden (403), not_found (404), invalid_request (400), rate_limited (429), server_error (500).
Rate limits
120 requests per minute per key. AI review generation is limited separately to 10 calls per hour per account, because each call is a paid generation.
Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. A 429 also includes Retry-After in seconds.
Versioning
The version is in the path (/api/v1) and echoed on every response as X-Api-Version. Breaking changes ship as a new path version; additive fields can appear at any time, so parse defensively and ignore unknown keys.