TheHackStack Docs Sign in

#Verification API reference (v1)

Base URL: https://thehackstack.com/api/v1

All responses are JSON. Errors use one envelope:

{ "error": { "code": "validation_failed", "message": "The request body is invalid.", "details": { "customer.id": ["…"] } } }

See Error handling. Rate limits and 429 handling are covered in API authentication.


#Create a verification session

POST /verification-sessions · authenticated · server-to-server only

#Request body

Field Type Required Notes
customer.id string yes Your stable internal id for the logged-in customer. 1–191 printable ASCII characters, no spaces. Don't use secrets or anything you wouldn't want stored.
customer.email string only if Require email match is on The customer's email address. Only a SHA-256 hash of the normalised address is stored.
intent "verify" | "write" no (default "verify") verify: the customer already reviewed you. write: send them to write a review first.
curl -X POST https://thehackstack.com/api/v1/verification-sessions \
  -H "Authorization: Bearer $THS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"customer":{"id":"user_8412"},"intent":"verify"}'

#Response 201 Created

{
  "object": "verification_session",
  "id": "vs_Q2s9xK1u0pWq3LmN7aZbYc4R",
  "intent": "verify",
  "product": { "name": "Acme Analytics", "url": "https://thehackstack.com/s/acme-analytics/" },
  "verification_url": "https://thehackstack.com/verify#token=thsv_…43 chars…",
  "expires_at": "2026-11-13T10:20:00+00:00",
  "expires_in": 600
}
  • Send verification_url to the browser once and redirect to it right away. Don't log it, email it or store it: it's a single-use bearer link.
  • The token sits in the URL fragment (#token=). Browsers never send fragments to servers or in Referer headers.
  • id is safe to log for support.
  • Responses carry Cache-Control: no-store and Referrer-Policy: no-referrer.

#Token guarantees

  • 256-bit random value; TheHackStack stores only its SHA-256 hash.
  • Valid for 10 minutes by default.
  • Single use. Opening the link doesn't use it up; it's consumed only when the signed-in reviewer confirms.
  • Bound to your app, your product and customer.id. One customer.id can verify reviews from one TheHackStack account.
  • Becomes invalid if the app is suspended or revoked, or the key that created it is revoked.

#Public SDK configuration

GET /apps/{appId}/sdk-config · public · used by the JavaScript SDK

{
  "app_id": "ths_app_…",
  "product": { "name": "Acme Analytics" },
  "review_url": "https://thehackstack.com/s/acme-analytics/#reviews",
  "verify_base_url": "https://thehackstack.com/verify"
}

CORS is granted only to https://<your-product-domain>, https://www.<your-product-domain> and any origins you list under app Settings. Other origins get 403 origin_not_allowed. Inactive or unknown apps return 404 not_found. Error responses carry no CORS headers, so in a browser the SDK sees them as network_error.


#Public reviews

GET /reviews?key={publisherKey} · public · used by the reviews widget

Your product's reviews, for showing them on your own site in any design. Everything returned is already public on TheHackStack, so any origin may call it from the browser (Access-Control-Allow-Origin: *, no cookies), and you can also call it from your server.

Query Default Notes
key required Your key (ths_pk_…).
limit 6 Reviews to return, 1–20. The summary always covers all reviews.
verified off 1 returns only Verified reviews.
min_rating 1 Only reviews with at least this many stars (1–5).
sort recent recent (newest first) or top (highest rating first).
curl "https://thehackstack.com/api/v1/reviews?key=ths_pk_k1_YOUR_PUBLISHER_KEY&limit=3&verified=1"
{
  "product": {
    "name": "Acme Analytics",
    "url": "https://thehackstack.com/s/acme-analytics/",
    "review_url": "https://thehackstack.com/r/ths_pk_k1_…"
  },
  "summary": {
    "average": 4.6,
    "count": 23,
    "verified_count": 17,
    "distribution": { "5": 16, "4": 5, "3": 1, "2": 1, "1": 0 }
  },
  "reviews": [
    {
      "id": 812,
      "author": { "name": "Priya S.", "initials": "PS", "avatar_url": null },
      "rating": 5,
      "body": "Set up in ten minutes and the reports are great.",
      "created_at": "2026-11-18T09:12:44+00:00",
      "verified": true
    }
  ],
  "powered_by": { "name": "TheHackStack", "url": "https://thehackstack.com" }
}
  • Reviewer names are shortened to first name and last initial. Emails and account ids are never returned.
  • Responses are cached for up to 5 minutes, so a new review can take that long to appear.
  • A replaced key or a suspended app returns 404 not_found. More than 300 requests a minute from one IP returns 429.
  • body is plain text. If you build your own design, insert it as text (for example textContent), never as HTML.
API and SDK served from https://thehackstack.com. Report security issues privately to the TheHackStack team.