API reference · v2
TrustReviews API
Base URL https://trustreviews.io/api/v2/. Every request needs an API key in the Authorization header as a Bearer token. Keys are issued from the business dashboard (coming soon). The API is part of the Premium plan ($129/mo).
Status: the API isn’t live yet. Every /api/v2 endpoint currently returns 401 unauthorized, so you can build and test your error handling now.
Errors
Errors share one shape: error.code, error.message and error.status. A wrong plan returns 403 plan_required.
{
"error": {
"code": "unauthorized",
"message": "Authentication failed. Provide a valid API key in the Authorization header.",
"status": 401
}
}{
"error": {
"code": "plan_required",
"message": "The TrustReviews API is available on the Premium plan.",
"status": 403
}
}Business
Get business profile
GET/api/v2/business/profilePremium plan required
Returns the verified business profile tied to the API key: name, domains, plan and the public Trust Score.
Errors
401 unauthorizedMissing or invalid API key. Every endpoint returns this today, until API keys go live.403 plan_requiredYour plan doesn’t include the API.422 validation_failedA field is missing or invalid.429 rate_limitedToo many requests. Retry after the Retry-After header.
curl -X GET 'https://trustreviews.io/api/v2/business/profile' \
-H "Authorization: Bearer $TRUSTREVIEWS_API_KEY"const res = await fetch("https://trustreviews.io/api/v2/business/profile", {
method: "GET",
headers: { "Authorization": `Bearer ${process.env.TRUSTREVIEWS_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get(
"https://trustreviews.io/api/v2/business/profile",
headers={"Authorization": f"Bearer {os.environ['TRUSTREVIEWS_API_KEY']}"},
)
print(res.status_code, res.json()){
"id": "biz_31x9",
"name": "Example Coffee Co.",
"domains": [
"examplecoffee.co.uk"
],
"plan": "premium",
"verified": true,
"trust_score": 4.6,
"review_count": 212,
"profile_url": "https://trustreviews.io/examplecoffee"
}{
"error": {
"code": "unauthorized",
"message": "Authentication failed. Provide a valid API key in the Authorization header.",
"status": 401
}
}Reviews
List reviews
GET/api/v2/reviewsPremium plan required
Lists published and held reviews for your business, newest first. Results are paginated with a cursor.
Query parameters
| Name | Type | Description |
|---|---|---|
status | string | published, held or all. Default published. |
rating | integer | Filter by star rating, 1–5. |
source | string | invited, organic or imported. |
since | ISO 8601 | Only reviews created after this time. |
limit | integer | 1–100. Default 20. |
cursor | string | next_cursor from the previous page. |
Errors
401 unauthorizedMissing or invalid API key. Every endpoint returns this today, until API keys go live.403 plan_requiredYour plan doesn’t include the API.422 validation_failedA field is missing or invalid.429 rate_limitedToo many requests. Retry after the Retry-After header.
curl -X GET 'https://trustreviews.io/api/v2/reviews' \
-H "Authorization: Bearer $TRUSTREVIEWS_API_KEY"const res = await fetch("https://trustreviews.io/api/v2/reviews", {
method: "GET",
headers: { "Authorization": `Bearer ${process.env.TRUSTREVIEWS_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get(
"https://trustreviews.io/api/v2/reviews",
headers={"Authorization": f"Bearer {os.environ['TRUSTREVIEWS_API_KEY']}"},
)
print(res.status_code, res.json()){
"data": [
{
"id": "rev_8f2k1c",
"rating": 4,
"title": "Quick and clear",
"body": "Ordered on Monday, arrived Wednesday. Support answered within an hour.",
"experience_date": "2026-11-18",
"author": {
"display_name": "Hannah C.",
"identity_checked": true,
"linked_accounts": [
"linkedin"
]
},
"source": "invited",
"status": "published",
"reply": null,
"created_at": "2026-11-19T09:12:04Z"
}
],
"next_cursor": "c_2Yh8",
"has_more": true
}{
"error": {
"code": "unauthorized",
"message": "Authentication failed. Provide a valid API key in the Authorization header.",
"status": 401
}
}Get a review
GET/api/v2/reviews/{id}Premium plan required
Returns one review, including its check status and any public reply.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string | Review ID, like rev_8f2k1c. |
Errors
401 unauthorizedMissing or invalid API key. Every endpoint returns this today, until API keys go live.403 plan_requiredYour plan doesn’t include the API.422 validation_failedA field is missing or invalid.429 rate_limitedToo many requests. Retry after the Retry-After header.
curl -X GET 'https://trustreviews.io/api/v2/reviews/rev_8f2k1c' \
-H "Authorization: Bearer $TRUSTREVIEWS_API_KEY"const res = await fetch("https://trustreviews.io/api/v2/reviews/rev_8f2k1c", {
method: "GET",
headers: { "Authorization": `Bearer ${process.env.TRUSTREVIEWS_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get(
"https://trustreviews.io/api/v2/reviews/rev_8f2k1c",
headers={"Authorization": f"Bearer {os.environ['TRUSTREVIEWS_API_KEY']}"},
)
print(res.status_code, res.json()){
"id": "rev_8f2k1c",
"rating": 4,
"title": "Quick and clear",
"body": "Ordered on Monday, arrived Wednesday. Support answered within an hour.",
"experience_date": "2026-11-18",
"author": {
"display_name": "Hannah C.",
"identity_checked": true,
"linked_accounts": [
"linkedin"
]
},
"source": "invited",
"status": "published",
"reply": null,
"created_at": "2026-11-19T09:12:04Z"
}{
"error": {
"code": "unauthorized",
"message": "Authentication failed. Provide a valid API key in the Authorization header.",
"status": 401
}
}Reply to a review
POST/api/v2/reviews/{id}/replyPremium plan required
Posts or replaces your public reply on a review. Replies appear under the review on your profile.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string | Review ID. |
Body
| Name | Type | Description |
|---|---|---|
bodyrequired | string | Reply text, 2–2000 characters. |
Errors
401 unauthorizedMissing or invalid API key. Every endpoint returns this today, until API keys go live.403 plan_requiredYour plan doesn’t include the API.422 validation_failedA field is missing or invalid.429 rate_limitedToo many requests. Retry after the Retry-After header.
curl -X POST 'https://trustreviews.io/api/v2/reviews/rev_8f2k1c/reply' \
-H "Authorization: Bearer $TRUSTREVIEWS_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"body": "Thanks Hannah, glad it arrived quickly."}'const res = await fetch("https://trustreviews.io/api/v2/reviews/rev_8f2k1c/reply", {
method: "POST",
headers: { "Authorization": `Bearer ${process.env.TRUSTREVIEWS_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"body": "Thanks Hannah, glad it arrived quickly."
})
});
const data = await res.json();import os, requests
res = requests.post(
"https://trustreviews.io/api/v2/reviews/rev_8f2k1c/reply",
headers={"Authorization": f"Bearer {os.environ['TRUSTREVIEWS_API_KEY']}"},
json={"body": "Thanks Hannah, glad it arrived quickly."},
)
print(res.status_code, res.json()){
"review_id": "rev_8f2k1c",
"reply": {
"body": "Thanks Hannah, glad it arrived quickly.",
"created_at": "2026-11-23T10:01:44Z"
}
}{
"error": {
"code": "unauthorized",
"message": "Authentication failed. Provide a valid API key in the Authorization header.",
"status": 401
}
}Trust Score
Get Trust Score
GET/api/v2/trust-scorePremium plan required
Returns the current Trust Score, the star breakdown and how many reviews are held.
Errors
401 unauthorizedMissing or invalid API key. Every endpoint returns this today, until API keys go live.403 plan_requiredYour plan doesn’t include the API.422 validation_failedA field is missing or invalid.429 rate_limitedToo many requests. Retry after the Retry-After header.
curl -X GET 'https://trustreviews.io/api/v2/trust-score' \
-H "Authorization: Bearer $TRUSTREVIEWS_API_KEY"const res = await fetch("https://trustreviews.io/api/v2/trust-score", {
method: "GET",
headers: { "Authorization": `Bearer ${process.env.TRUSTREVIEWS_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get(
"https://trustreviews.io/api/v2/trust-score",
headers={"Authorization": f"Bearer {os.environ['TRUSTREVIEWS_API_KEY']}"},
)
print(res.status_code, res.json()){
"trust_score": 4.6,
"review_count": 212,
"breakdown": {
"5": 141,
"4": 44,
"3": 12,
"2": 6,
"1": 9
},
"held_count": 3,
"updated_at": "2026-11-23T09:00:00Z"
}{
"error": {
"code": "unauthorized",
"message": "Authentication failed. Provide a valid API key in the Authorization header.",
"status": 401
}
}Invitations
Send an invitation
POST/api/v2/invitationsPremium plan required
Invites a customer to review you. Invitations count toward your plan allowance.
Body
| Name | Type | Description |
|---|---|---|
emailrequired | string | Customer email. |
name | string | Customer first name for the email. |
reference | string | Your order number. |
send_at | ISO 8601 | Schedule for later. Default now. |
Errors
401 unauthorizedMissing or invalid API key. Every endpoint returns this today, until API keys go live.403 plan_requiredYour plan doesn’t include the API.422 validation_failedA field is missing or invalid.429 rate_limitedToo many requests. Retry after the Retry-After header.
curl -X POST 'https://trustreviews.io/api/v2/invitations' \
-H "Authorization: Bearer $TRUSTREVIEWS_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"email": "sam@example.com", "name": "Sam", "reference": "10482"}'const res = await fetch("https://trustreviews.io/api/v2/invitations", {
method: "POST",
headers: { "Authorization": `Bearer ${process.env.TRUSTREVIEWS_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"email": "sam@example.com",
"name": "Sam",
"reference": "10482"
})
});
const data = await res.json();import os, requests
res = requests.post(
"https://trustreviews.io/api/v2/invitations",
headers={"Authorization": f"Bearer {os.environ['TRUSTREVIEWS_API_KEY']}"},
json={"email": "sam@example.com", "name": "Sam", "reference": "10482"},
)
print(res.status_code, res.json()){
"id": "inv_7Qd2",
"status": "scheduled",
"send_at": "2026-11-23T10:05:00Z"
}{
"error": {
"code": "unauthorized",
"message": "Authentication failed. Provide a valid API key in the Authorization header.",
"status": 401
}
}List invitations
GET/api/v2/invitationsPremium plan required
Lists invitations and their status: scheduled, sent, opened, reviewed or bounced.
Query parameters
| Name | Type | Description |
|---|---|---|
status | string | Filter by status. |
limit | integer | 1–100. Default 20. |
cursor | string | Pagination cursor. |
Errors
401 unauthorizedMissing or invalid API key. Every endpoint returns this today, until API keys go live.403 plan_requiredYour plan doesn’t include the API.422 validation_failedA field is missing or invalid.429 rate_limitedToo many requests. Retry after the Retry-After header.
curl -X GET 'https://trustreviews.io/api/v2/invitations' \
-H "Authorization: Bearer $TRUSTREVIEWS_API_KEY"const res = await fetch("https://trustreviews.io/api/v2/invitations", {
method: "GET",
headers: { "Authorization": `Bearer ${process.env.TRUSTREVIEWS_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get(
"https://trustreviews.io/api/v2/invitations",
headers={"Authorization": f"Bearer {os.environ['TRUSTREVIEWS_API_KEY']}"},
)
print(res.status_code, res.json()){
"data": [
{
"id": "inv_7Qd2",
"email": "s***@example.com",
"status": "sent",
"reference": "10482",
"sent_at": "2026-11-23T10:05:02Z"
}
],
"next_cursor": null,
"has_more": false
}{
"error": {
"code": "unauthorized",
"message": "Authentication failed. Provide a valid API key in the Authorization header.",
"status": 401
}
}Imports
Start an import
POST/api/v2/importsPremium plan required
Imports existing reviews from another platform. Imported reviews keep a label showing where they came from.
Body
| Name | Type | Description |
|---|---|---|
sourcerequired | string | trustpilot, google or facebook. |
source_urlrequired | string | Your public profile URL on that platform. |
Errors
401 unauthorizedMissing or invalid API key. Every endpoint returns this today, until API keys go live.403 plan_requiredYour plan doesn’t include the API.422 validation_failedA field is missing or invalid.429 rate_limitedToo many requests. Retry after the Retry-After header.
curl -X POST 'https://trustreviews.io/api/v2/imports' \
-H "Authorization: Bearer $TRUSTREVIEWS_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"source": "trustpilot", "source_url": "https://www.trustpilot.com/review/examplecoffee.co.uk"}'const res = await fetch("https://trustreviews.io/api/v2/imports", {
method: "POST",
headers: { "Authorization": `Bearer ${process.env.TRUSTREVIEWS_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"source": "trustpilot",
"source_url": "https://www.trustpilot.com/review/examplecoffee.co.uk"
})
});
const data = await res.json();import os, requests
res = requests.post(
"https://trustreviews.io/api/v2/imports",
headers={"Authorization": f"Bearer {os.environ['TRUSTREVIEWS_API_KEY']}"},
json={"source": "trustpilot", "source_url": "https://www.trustpilot.com/review/examplecoffee.co.uk"},
)
print(res.status_code, res.json()){
"id": "imp_44a1",
"status": "queued",
"source": "trustpilot"
}{
"error": {
"code": "unauthorized",
"message": "Authentication failed. Provide a valid API key in the Authorization header.",
"status": 401
}
}Get import status
GET/api/v2/imports/{id}Premium plan required
Returns progress for an import.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string | Import ID. |
Errors
401 unauthorizedMissing or invalid API key. Every endpoint returns this today, until API keys go live.403 plan_requiredYour plan doesn’t include the API.422 validation_failedA field is missing or invalid.429 rate_limitedToo many requests. Retry after the Retry-After header.
curl -X GET 'https://trustreviews.io/api/v2/imports/imp_44a1' \
-H "Authorization: Bearer $TRUSTREVIEWS_API_KEY"const res = await fetch("https://trustreviews.io/api/v2/imports/imp_44a1", {
method: "GET",
headers: { "Authorization": `Bearer ${process.env.TRUSTREVIEWS_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get(
"https://trustreviews.io/api/v2/imports/imp_44a1",
headers={"Authorization": f"Bearer {os.environ['TRUSTREVIEWS_API_KEY']}"},
)
print(res.status_code, res.json()){
"id": "imp_44a1",
"status": "running",
"imported": 64,
"skipped": 2,
"total": 120
}{
"error": {
"code": "unauthorized",
"message": "Authentication failed. Provide a valid API key in the Authorization header.",
"status": 401
}
}Widgets
List widgets
GET/api/v2/widgetsPremium plan required
Lists your review widgets with their embed snippets.
Errors
401 unauthorizedMissing or invalid API key. Every endpoint returns this today, until API keys go live.403 plan_requiredYour plan doesn’t include the API.422 validation_failedA field is missing or invalid.429 rate_limitedToo many requests. Retry after the Retry-After header.
curl -X GET 'https://trustreviews.io/api/v2/widgets' \
-H "Authorization: Bearer $TRUSTREVIEWS_API_KEY"const res = await fetch("https://trustreviews.io/api/v2/widgets", {
method: "GET",
headers: { "Authorization": `Bearer ${process.env.TRUSTREVIEWS_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get(
"https://trustreviews.io/api/v2/widgets",
headers={"Authorization": f"Bearer {os.environ['TRUSTREVIEWS_API_KEY']}"},
)
print(res.status_code, res.json()){
"data": [
{
"id": "wdg_mini",
"type": "mini",
"embed": "<div data-trustreviews-widget=\"wdg_mini\"></div>"
}
]
}{
"error": {
"code": "unauthorized",
"message": "Authentication failed. Provide a valid API key in the Authorization header.",
"status": 401
}
}Analytics
Analytics summary
GET/api/v2/analytics/summaryPremium plan required
Totals for a period: invitations, open rate, new reviews, average rating and widget views.
Query parameters
| Name | Type | Description |
|---|---|---|
from | date | Start date. Default 30 days ago. |
to | date | End date. Default today. |
Errors
401 unauthorizedMissing or invalid API key. Every endpoint returns this today, until API keys go live.403 plan_requiredYour plan doesn’t include the API.422 validation_failedA field is missing or invalid.429 rate_limitedToo many requests. Retry after the Retry-After header.
curl -X GET 'https://trustreviews.io/api/v2/analytics/summary' \
-H "Authorization: Bearer $TRUSTREVIEWS_API_KEY"const res = await fetch("https://trustreviews.io/api/v2/analytics/summary", {
method: "GET",
headers: { "Authorization": `Bearer ${process.env.TRUSTREVIEWS_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get(
"https://trustreviews.io/api/v2/analytics/summary",
headers={"Authorization": f"Bearer {os.environ['TRUSTREVIEWS_API_KEY']}"},
)
print(res.status_code, res.json()){
"from": "2026-10-24",
"to": "2026-11-23",
"invitations_sent": 286,
"open_rate": 0.61,
"new_reviews": 74,
"average_rating": 4.5,
"widget_views": 18342
}{
"error": {
"code": "unauthorized",
"message": "Authentication failed. Provide a valid API key in the Authorization header.",
"status": 401
}
}Webhooks
Create a webhook
POST/api/v2/webhooksPremium plan required
Registers an HTTPS endpoint for events like review.published or review.held. Payloads are signed with the returned secret.
Body
| Name | Type | Description |
|---|---|---|
urlrequired | string | HTTPS URL. |
eventsrequired | string[] | review.published, review.held, review.replied, import.completed, event.displayed. |
Errors
401 unauthorizedMissing or invalid API key. Every endpoint returns this today, until API keys go live.403 plan_requiredYour plan doesn’t include the API.422 validation_failedA field is missing or invalid.429 rate_limitedToo many requests. Retry after the Retry-After header.
curl -X POST 'https://trustreviews.io/api/v2/webhooks' \
-H "Authorization: Bearer $TRUSTREVIEWS_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"url": "https://yourshop.com/hooks/trustreviews", "events": ["review.published", "review.held"]}'const res = await fetch("https://trustreviews.io/api/v2/webhooks", {
method: "POST",
headers: { "Authorization": `Bearer ${process.env.TRUSTREVIEWS_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"url": "https://yourshop.com/hooks/trustreviews",
"events": [
"review.published",
"review.held"
]
})
});
const data = await res.json();import os, requests
res = requests.post(
"https://trustreviews.io/api/v2/webhooks",
headers={"Authorization": f"Bearer {os.environ['TRUSTREVIEWS_API_KEY']}"},
json={"url": "https://yourshop.com/hooks/trustreviews", "events": ["review.published", "review.held"]},
)
print(res.status_code, res.json()){
"id": "wh_9k2",
"url": "https://yourshop.com/hooks/trustreviews",
"events": [
"review.published",
"review.held"
],
"secret": "whsec_…"
}{
"error": {
"code": "unauthorized",
"message": "Authentication failed. Provide a valid API key in the Authorization header.",
"status": 401
}
}List webhooks
GET/api/v2/webhooksPremium plan required
Lists registered webhooks.
Errors
401 unauthorizedMissing or invalid API key. Every endpoint returns this today, until API keys go live.403 plan_requiredYour plan doesn’t include the API.422 validation_failedA field is missing or invalid.429 rate_limitedToo many requests. Retry after the Retry-After header.
curl -X GET 'https://trustreviews.io/api/v2/webhooks' \
-H "Authorization: Bearer $TRUSTREVIEWS_API_KEY"const res = await fetch("https://trustreviews.io/api/v2/webhooks", {
method: "GET",
headers: { "Authorization": `Bearer ${process.env.TRUSTREVIEWS_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get(
"https://trustreviews.io/api/v2/webhooks",
headers={"Authorization": f"Bearer {os.environ['TRUSTREVIEWS_API_KEY']}"},
)
print(res.status_code, res.json()){
"data": [
{
"id": "wh_9k2",
"url": "https://yourshop.com/hooks/trustreviews",
"events": [
"review.published"
]
}
]
}{
"error": {
"code": "unauthorized",
"message": "Authentication failed. Provide a valid API key in the Authorization header.",
"status": 401
}
}Delete a webhook
DELETE/api/v2/webhooks/{id}Premium plan required
Removes a webhook.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string | Webhook ID. |
Errors
401 unauthorizedMissing or invalid API key. Every endpoint returns this today, until API keys go live.403 plan_requiredYour plan doesn’t include the API.422 validation_failedA field is missing or invalid.429 rate_limitedToo many requests. Retry after the Retry-After header.
curl -X DELETE 'https://trustreviews.io/api/v2/webhooks/wh_9k2' \
-H "Authorization: Bearer $TRUSTREVIEWS_API_KEY"const res = await fetch("https://trustreviews.io/api/v2/webhooks/wh_9k2", {
method: "DELETE",
headers: { "Authorization": `Bearer ${process.env.TRUSTREVIEWS_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.delete(
"https://trustreviews.io/api/v2/webhooks/wh_9k2",
headers={"Authorization": f"Bearer {os.environ['TRUSTREVIEWS_API_KEY']}"},
)
print(res.status_code, res.json()){
"id": "wh_9k2",
"deleted": true
}{
"error": {
"code": "unauthorized",
"message": "Authentication failed. Provide a valid API key in the Authorization header.",
"status": 401
}
}TrustReview Events
Send an event
POST/api/v2/eventsPremium plan required
Sends one customer event, like a purchase, to show as a notice in the bottom-left corner of your site. Send every event you want shown, with your own event name (purchase is the most common). Only events with consent_given true are ever displayed. Every event is screened by TrustEvent™ before it can be shown, and the response includes a public verify_url anyone can open to check it.
Body
| Name | Type | Description |
|---|---|---|
event_namerequired | string | Your own name for the event, like purchase, booking or signup. Lowercase letters, numbers and underscores. |
event_idrequired | string | Your unique ID for this event. Used as an idempotency key: sending the same event_id twice returns the first result. |
occurred_atrequired | ISO 8601 | When it happened, like 2026-11-23T14:02:11Z. |
user.id_hashrequired | string | sha256(salt + user_id), hex. Use the per-account salt shown in your dashboard. Never send the raw user ID. |
user.first_namerequired | string | Customer first name. |
user.last_namerequired | string | Customer last name. Only the initial is shown by default. |
user.display_name_format | string | full, first_initial (default, “First L.”), first_only or anonymous. |
user.photo_url | string | HTTPS image, square, at least 128×128 px. Or send user.photo_base64 instead (JPEG or PNG). |
user.ip | string | Masked IP only. IPv4 with the last block removed, like 123.123.123.xxx. IPv6 truncated to /48. Never send a full IP. |
location.city / location.country_code | string | Optional. If missing, we derive an approximate city from the masked IP. |
item.name / item.url / item.image_url / item.sku | string | What the event is about. item.name is used in the message. |
value.amount / value.currency / value.show_value | number / string / boolean | Order value. Hidden unless show_value is true. |
display.show / message_template / verb / ttl_minutes | object | Whether to show it, the text template (placeholders {first_name}, {city}, {verb}, {item_name}), the verb and how long it may be shown. |
consent.consent_givenrequired | boolean | Must be true. Events without consent are rejected. |
consent.consent_timestamp / consent_method | string | When and how consent was collected. |
metadata | object | Up to 20 string keys for your own use. Never shown. |
test | boolean | true to validate without displaying. |
Errors
401 unauthorizedMissing or invalid API key. Every endpoint returns this today, until API keys go live.403 plan_requiredYour plan doesn’t include the API.422 validation_failedA field is missing or invalid.429 rate_limitedToo many requests. Retry after the Retry-After header.
curl -X POST 'https://trustreviews.io/api/v2/events' \
-H "Authorization: Bearer $TRUSTREVIEWS_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"event_name": "purchase", "event_id": "order_10482", "occurred_at": "2026-11-23T14:02:11Z", "user": {"id_hash": "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8", "first_name": "Sarah", "last_name": "Kent", "display_name_format": "first_initial", "photo_url": "https://cdn.yourshop.com/avatars/8812.jpg", "ip": "81.2.69.xxx"}, "location": {"city": "London", "country_code": "GB"}, "item": {"name": "Pro Plan", "url": "https://yourshop.com/pro", "image_url": "https://yourshop.com/img/pro.png", "sku": "PRO-12"}, "value": {"amount": 59.0, "currency": "GBP", "show_value": false}, "display": {"show": true, "message_template": "{first_name} from {city} {verb} {item_name}", "verb": "purchased", "ttl_minutes": 1440}, "consent": {"consent_given": true, "consent_timestamp": "2026-11-23T13:58:40Z", "consent_method": "checkout_checkbox"}, "metadata": {"plan_interval": "monthly"}, "test": false}'const res = await fetch("https://trustreviews.io/api/v2/events", {
method: "POST",
headers: { "Authorization": `Bearer ${process.env.TRUSTREVIEWS_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"event_name": "purchase",
"event_id": "order_10482",
"occurred_at": "2026-11-23T14:02:11Z",
"user": {
"id_hash": "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8",
"first_name": "Sarah",
"last_name": "Kent",
"display_name_format": "first_initial",
"photo_url": "https://cdn.yourshop.com/avatars/8812.jpg",
"ip": "81.2.69.xxx"
},
"location": {
"city": "London",
"country_code": "GB"
},
"item": {
"name": "Pro Plan",
"url": "https://yourshop.com/pro",
"image_url": "https://yourshop.com/img/pro.png",
"sku": "PRO-12"
},
"value": {
"amount": 59.0,
"currency": "GBP",
"show_value": false
},
"display": {
"show": true,
"message_template": "{first_name} from {city} {verb} {item_name}",
"verb": "purchased",
"ttl_minutes": 1440
},
"consent": {
"consent_given": true,
"consent_timestamp": "2026-11-23T13:58:40Z",
"consent_method": "checkout_checkbox"
},
"metadata": {
"plan_interval": "monthly"
},
"test": false
})
});
const data = await res.json();import os, requests
res = requests.post(
"https://trustreviews.io/api/v2/events",
headers={"Authorization": f"Bearer {os.environ['TRUSTREVIEWS_API_KEY']}"},
json={"event_name": "purchase", "event_id": "order_10482", "occurred_at": "2026-11-23T14:02:11Z", "user": {"id_hash": "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8", "first_name": "Sarah", "last_name": "Kent", "display_name_format": "first_initial", "photo_url": "https://cdn.yourshop.com/avatars/8812.jpg", "ip": "81.2.69.xxx"}, "location": {"city": "London", "country_code": "GB"}, "item": {"name": "Pro Plan", "url": "https://yourshop.com/pro", "image_url": "https://yourshop.com/img/pro.png", "sku": "PRO-12"}, "value": {"amount": 59.0, "currency": "GBP", "show_value": False}, "display": {"show": True, "message_template": "{first_name} from {city} {verb} {item_name}", "verb": "purchased", "ttl_minutes": 1440}, "consent": {"consent_given": True, "consent_timestamp": "2026-11-23T13:58:40Z", "consent_method": "checkout_checkbox"}, "metadata": {"plan_interval": "monthly"}, "test": False},
)
print(res.status_code, res.json()){
"id": "evt_01JD4X9K2QW",
"status": "accepted",
"created_at": "2026-11-23T14:02:12Z",
"verify_url": "https://trustreviews.io/verify/event/evt_01JD4X9K2QW",
"display_name": "Sarah K."
}{
"error": {
"code": "unauthorized",
"message": "Authentication failed. Provide a valid API key in the Authorization header.",
"status": 401
}
}Send events in a batch
POST/api/v2/events/batchPremium plan required
Sends several events in one request. Each event is validated on its own; the response lists results in the same order. See limits for the batch size.
Body
| Name | Type | Description |
|---|---|---|
eventsrequired | Event[] | Array of event objects, same fields as POST /events. |
Errors
401 unauthorizedMissing or invalid API key. Every endpoint returns this today, until API keys go live.403 plan_requiredYour plan doesn’t include the API.422 validation_failedA field is missing or invalid.429 rate_limitedToo many requests. Retry after the Retry-After header.
curl -X POST 'https://trustreviews.io/api/v2/events/batch' \
-H "Authorization: Bearer $TRUSTREVIEWS_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"events": [{"event_name": "purchase", "event_id": "order_10482", "occurred_at": "2026-11-23T14:02:11Z", "user": {"id_hash": "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8", "first_name": "Sarah", "last_name": "Kent", "display_name_format": "first_initial", "photo_url": "https://cdn.yourshop.com/avatars/8812.jpg", "ip": "81.2.69.xxx"}, "location": {"city": "London", "country_code": "GB"}, "item": {"name": "Pro Plan", "url": "https://yourshop.com/pro", "image_url": "https://yourshop.com/img/pro.png", "sku": "PRO-12"}, "value": {"amount": 59.0, "currency": "GBP", "show_value": false}, "display": {"show": true, "message_template": "{first_name} from {city} {verb} {item_name}", "verb": "purchased", "ttl_minutes": 1440}, "consent": {"consent_given": true, "consent_timestamp": "2026-11-23T13:58:40Z", "consent_method": "checkout_checkbox"}, "metadata": {"plan_interval": "monthly"}, "test": false}]}'const res = await fetch("https://trustreviews.io/api/v2/events/batch", {
method: "POST",
headers: { "Authorization": `Bearer ${process.env.TRUSTREVIEWS_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"events": [
{
"event_name": "purchase",
"event_id": "order_10482",
"occurred_at": "2026-11-23T14:02:11Z",
"user": {
"id_hash": "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8",
"first_name": "Sarah",
"last_name": "Kent",
"display_name_format": "first_initial",
"photo_url": "https://cdn.yourshop.com/avatars/8812.jpg",
"ip": "81.2.69.xxx"
},
"location": {
"city": "London",
"country_code": "GB"
},
"item": {
"name": "Pro Plan",
"url": "https://yourshop.com/pro",
"image_url": "https://yourshop.com/img/pro.png",
"sku": "PRO-12"
},
"value": {
"amount": 59.0,
"currency": "GBP",
"show_value": false
},
"display": {
"show": true,
"message_template": "{first_name} from {city} {verb} {item_name}",
"verb": "purchased",
"ttl_minutes": 1440
},
"consent": {
"consent_given": true,
"consent_timestamp": "2026-11-23T13:58:40Z",
"consent_method": "checkout_checkbox"
},
"metadata": {
"plan_interval": "monthly"
},
"test": false
}
]
})
});
const data = await res.json();import os, requests
res = requests.post(
"https://trustreviews.io/api/v2/events/batch",
headers={"Authorization": f"Bearer {os.environ['TRUSTREVIEWS_API_KEY']}"},
json={"events": [{"event_name": "purchase", "event_id": "order_10482", "occurred_at": "2026-11-23T14:02:11Z", "user": {"id_hash": "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8", "first_name": "Sarah", "last_name": "Kent", "display_name_format": "first_initial", "photo_url": "https://cdn.yourshop.com/avatars/8812.jpg", "ip": "81.2.69.xxx"}, "location": {"city": "London", "country_code": "GB"}, "item": {"name": "Pro Plan", "url": "https://yourshop.com/pro", "image_url": "https://yourshop.com/img/pro.png", "sku": "PRO-12"}, "value": {"amount": 59.0, "currency": "GBP", "show_value": False}, "display": {"show": True, "message_template": "{first_name} from {city} {verb} {item_name}", "verb": "purchased", "ttl_minutes": 1440}, "consent": {"consent_given": True, "consent_timestamp": "2026-11-23T13:58:40Z", "consent_method": "checkout_checkbox"}, "metadata": {"plan_interval": "monthly"}, "test": False}]},
)
print(res.status_code, res.json()){
"results": [
{
"id": "evt_01JD4X9K2QW",
"status": "accepted",
"created_at": "2026-11-23T14:02:12Z",
"verify_url": "https://trustreviews.io/verify/event/evt_01JD4X9K2QW",
"display_name": "Sarah K."
}
]
}{
"error": {
"code": "unauthorized",
"message": "Authentication failed. Provide a valid API key in the Authorization header.",
"status": 401
}
}List events
GET/api/v2/eventsPremium plan required
Lists events you have sent, with their screening and display status.
Query parameters
| Name | Type | Description |
|---|---|---|
event_name | string | Filter by name. |
status | string | accepted, queued, displayed, held or rejected. |
limit | integer | 1–100. |
cursor | string | Pagination cursor. |
Errors
401 unauthorizedMissing or invalid API key. Every endpoint returns this today, until API keys go live.403 plan_requiredYour plan doesn’t include the API.422 validation_failedA field is missing or invalid.429 rate_limitedToo many requests. Retry after the Retry-After header.
curl -X GET 'https://trustreviews.io/api/v2/events' \
-H "Authorization: Bearer $TRUSTREVIEWS_API_KEY"const res = await fetch("https://trustreviews.io/api/v2/events", {
method: "GET",
headers: { "Authorization": `Bearer ${process.env.TRUSTREVIEWS_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get(
"https://trustreviews.io/api/v2/events",
headers={"Authorization": f"Bearer {os.environ['TRUSTREVIEWS_API_KEY']}"},
)
print(res.status_code, res.json()){
"data": [
{
"id": "evt_01JD4X9K2QW",
"event_name": "purchase",
"status": "displayed",
"display_name": "Sarah K.",
"trustevent": "passed",
"verify_url": "https://trustreviews.io/verify/event/evt_01JD4X9K2QW"
}
],
"next_cursor": null,
"has_more": false
}{
"error": {
"code": "unauthorized",
"message": "Authentication failed. Provide a valid API key in the Authorization header.",
"status": 401
}
}Get an event
GET/api/v2/events/{id}Premium plan required
Returns one event.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string | Event ID. |
Errors
401 unauthorizedMissing or invalid API key. Every endpoint returns this today, until API keys go live.403 plan_requiredYour plan doesn’t include the API.422 validation_failedA field is missing or invalid.429 rate_limitedToo many requests. Retry after the Retry-After header.
curl -X GET 'https://trustreviews.io/api/v2/events/evt_01JD4X9K2QW' \
-H "Authorization: Bearer $TRUSTREVIEWS_API_KEY"const res = await fetch("https://trustreviews.io/api/v2/events/evt_01JD4X9K2QW", {
method: "GET",
headers: { "Authorization": `Bearer ${process.env.TRUSTREVIEWS_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get(
"https://trustreviews.io/api/v2/events/evt_01JD4X9K2QW",
headers={"Authorization": f"Bearer {os.environ['TRUSTREVIEWS_API_KEY']}"},
)
print(res.status_code, res.json()){
"id": "evt_01JD4X9K2QW",
"status": "displayed",
"created_at": "2026-11-23T14:02:12Z",
"verify_url": "https://trustreviews.io/verify/event/evt_01JD4X9K2QW",
"display_name": "Sarah K.",
"trustevent": "passed"
}{
"error": {
"code": "unauthorized",
"message": "Authentication failed. Provide a valid API key in the Authorization header.",
"status": 401
}
}Delete an event
DELETE/api/v2/events/{id}Premium plan required
Removes an event and stops showing it, for example after a GDPR erasure request. Its verify page then shows “Event not found”.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string | Event ID. |
Errors
401 unauthorizedMissing or invalid API key. Every endpoint returns this today, until API keys go live.403 plan_requiredYour plan doesn’t include the API.422 validation_failedA field is missing or invalid.429 rate_limitedToo many requests. Retry after the Retry-After header.
curl -X DELETE 'https://trustreviews.io/api/v2/events/evt_01JD4X9K2QW' \
-H "Authorization: Bearer $TRUSTREVIEWS_API_KEY"const res = await fetch("https://trustreviews.io/api/v2/events/evt_01JD4X9K2QW", {
method: "DELETE",
headers: { "Authorization": `Bearer ${process.env.TRUSTREVIEWS_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.delete(
"https://trustreviews.io/api/v2/events/evt_01JD4X9K2QW",
headers={"Authorization": f"Bearer {os.environ['TRUSTREVIEWS_API_KEY']}"},
)
print(res.status_code, res.json()){
"id": "evt_01JD4X9K2QW",
"deleted": true
}{
"error": {
"code": "unauthorized",
"message": "Authentication failed. Provide a valid API key in the Authorization header.",
"status": 401
}
}Delete all events for a customer
DELETE/api/v2/events/by-user/{id_hash}Premium plan required
Erases every event for one customer, identified by the same id_hash you sent.
Path parameters
| Name | Type | Description |
|---|---|---|
id_hashrequired | string | sha256(salt + user_id). |
Errors
401 unauthorizedMissing or invalid API key. Every endpoint returns this today, until API keys go live.403 plan_requiredYour plan doesn’t include the API.422 validation_failedA field is missing or invalid.429 rate_limitedToo many requests. Retry after the Retry-After header.
curl -X DELETE 'https://trustreviews.io/api/v2/events/by-user/5e8848…42d8' \
-H "Authorization: Bearer $TRUSTREVIEWS_API_KEY"const res = await fetch("https://trustreviews.io/api/v2/events/by-user/5e8848…42d8", {
method: "DELETE",
headers: { "Authorization": `Bearer ${process.env.TRUSTREVIEWS_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.delete(
"https://trustreviews.io/api/v2/events/by-user/5e8848…42d8",
headers={"Authorization": f"Bearer {os.environ['TRUSTREVIEWS_API_KEY']}"},
)
print(res.status_code, res.json()){
"id_hash": "5e8848…42d8",
"deleted": 14
}{
"error": {
"code": "unauthorized",
"message": "Authentication failed. Provide a valid API key in the Authorization header.",
"status": 401
}
}Get notice settings
GET/api/v2/events/settingsPremium plan required
Returns how notices appear on your site.
Errors
401 unauthorizedMissing or invalid API key. Every endpoint returns this today, until API keys go live.403 plan_requiredYour plan doesn’t include the API.422 validation_failedA field is missing or invalid.429 rate_limitedToo many requests. Retry after the Retry-After header.
curl -X GET 'https://trustreviews.io/api/v2/events/settings' \
-H "Authorization: Bearer $TRUSTREVIEWS_API_KEY"const res = await fetch("https://trustreviews.io/api/v2/events/settings", {
method: "GET",
headers: { "Authorization": `Bearer ${process.env.TRUSTREVIEWS_API_KEY}` }
});
const data = await res.json();import os, requests
res = requests.get(
"https://trustreviews.io/api/v2/events/settings",
headers={"Authorization": f"Bearer {os.environ['TRUSTREVIEWS_API_KEY']}"},
)
print(res.status_code, res.json()){
"position": "bottom-left",
"theme": "light",
"frequency_seconds": 12,
"max_per_session": 5,
"event_names": [
"purchase",
"booking"
]
}{
"error": {
"code": "unauthorized",
"message": "Authentication failed. Provide a valid API key in the Authorization header.",
"status": 401
}
}Update notice settings
PATCH/api/v2/events/settingsPremium plan required
Changes how notices appear. Send only the fields you want to change.
Body
| Name | Type | Description |
|---|---|---|
position | string | bottom-left (default) or bottom-right. |
theme | string | light or dark. |
frequency_seconds | integer | Gap between notices. |
max_per_session | integer | Most notices one visitor sees per session. |
event_names | string[] | Which event names to show. |
Errors
401 unauthorizedMissing or invalid API key. Every endpoint returns this today, until API keys go live.403 plan_requiredYour plan doesn’t include the API.422 validation_failedA field is missing or invalid.429 rate_limitedToo many requests. Retry after the Retry-After header.
curl -X PATCH 'https://trustreviews.io/api/v2/events/settings' \
-H "Authorization: Bearer $TRUSTREVIEWS_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"max_per_session": 3}'const res = await fetch("https://trustreviews.io/api/v2/events/settings", {
method: "PATCH",
headers: { "Authorization": `Bearer ${process.env.TRUSTREVIEWS_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"max_per_session": 3
})
});
const data = await res.json();import os, requests
res = requests.patch(
"https://trustreviews.io/api/v2/events/settings",
headers={"Authorization": f"Bearer {os.environ['TRUSTREVIEWS_API_KEY']}"},
json={"max_per_session": 3},
)
print(res.status_code, res.json()){
"position": "bottom-left",
"theme": "light",
"frequency_seconds": 12,
"max_per_session": 3,
"event_names": [
"purchase",
"booking"
]
}{
"error": {
"code": "unauthorized",
"message": "Authentication failed. Provide a valid API key in the Authorization header.",
"status": 401
}
}Event verification (public)
Public verify page
GET/verify/event/{event_id}Public, no key
Every accepted event gets a public page on our domain at https://trustreviews.io/verify/event/{event_id}. It shows the business, the event, the item, the time, the display name (First L.) and an approximate location. The IP address is never shown. Unknown or deleted events show “Event not found” with HTTP 404. This page needs no API key. See the sample at /verify/event/example.
Path parameters
| Name | Type | Description |
|---|---|---|
event_idrequired | string | The id returned when the event was sent. |
Responses
200HTML page with the event details. Open the sample404“Event not found” for unknown or deleted events.
curl -X GET 'https://trustreviews.io/verify/event/example'const res = await fetch("https://trustreviews.io/verify/event/example", {
method: "GET",
headers: { }
});
const data = await res.json();import os, requests
res = requests.get(
"https://trustreviews.io/verify/event/example",
)
print(res.status_code, res.json())