Skip to content
TrustProof

Developers

API documentation

The widget embed works on every plan. The REST API is included in the Enterprise plan.

1. Widget embed (all plans)

Create a widget in your account (Widgets tab), then paste its snippet where reviews should appear. The script reads only verified, published reviews and shows author names as first name and last initial.

<div data-trustproof-widget="WIDGET_ID" data-product-name="Your product"></div>
<script async src="https://trustproof.example/embed.js"></script>

data-product-name is used on Growth and above to add schema.org rating markup (JSON-LD). Google decides whether to show rich results.

Public read endpoint used by the script: GET /api/widget/WIDGET_ID returns type, storeName, average, count, reviews[]. No cookies are set.

2. Authentication (Enterprise)

Create a key in your account (API tab). It is shown once. Send it as a Bearer token. Keys belong to one account and can read only that account's stores. Limit: 600 requests per 15 minutes per key and IP.

Authorization: Bearer tp_xxxxxxxxxxxxxxxxxxxxxxxx

3. Create orders and review links

Send up to 200 orders per request. Re-sending an order number updates that order and keeps its link. The response contains a personal review link for each order. A review written through that link is verified.

curl -X POST https://trustproof.example/api/v1/orders \
  -H "Authorization: Bearer $TRUSTPROOF_KEY" \
  -H "Content-Type: application/json" \
  -d '{"store":"STORE_KEY","orders":[{"email":"maria@example.com","orderRef":"1001","customerName":"Maria Lopez"}]}'
201 { "ok": true, "orders": [ { "orderRef": "1001", "email": "maria@example.com", "token": "...", "reviewUrl": "https://trustproof.example/r/?t=..." } ] }

4. List reviews

curl "https://trustproof.example/api/v1/reviews?store=STORE_KEY&limit=50" \
  -H "Authorization: Bearer $TRUSTPROOF_KEY"
200 { "store": "My Store", "reviews": [ { "id": "...", "author": "Maria Lopez", "rating": 5, "title": "", "body": "...", "verification": "verified", "status": "published", "orderRef": "1001", "createdAt": 1790000000000 } ] }

verification is verified, pending (imported, waiting for our team), unverified or rejected.

5. Errors

Errors are JSON: { "error": "code", "message": "text" }. Statuses: 400 invalid input, 401 missing or wrong key, 403 plan or access ended, 404 unknown store, 429 rate limit.

6. Platforms

The widget snippet works in Shopify, WooCommerce, Magento, BigCommerce and PrestaShop themes. Dedicated apps are coming soon. Until then, send orders with the API or CSV.

Questions? Contact support. API access is part of the Enterprise plan: see plans.