Skip to content

Web chat customer token

POST/api/v1/sohbet-token

Called from your server with the secret key: issues a short-lived (at most 15 minutes), single-use, encrypted token for a customer who is signed in on your site. Print it into the page as data-musteri-token; a chat window opened with it treats the customer’s phone number as verified, so their own orders can be discussed. Only issue it with the signed-in customer’s own number.

  • Authentication: Authorization: Bearer rz_live_…
  • Scope: sohbet:write
  • Plan feature: Web chat — if off, the endpoint answers 404 not_found
  • Idempotency-Key: optional (recommended for retries)

Fields marked * are required. Unknown fields are rejected with 422.

CustomerTokenIn

FieldTypeLimitsMeaning
musteri *zitena_api__routes_sohbet__CustomerIn
gecerlilik_sninteger≥ 60, ≤ 900, default 600

zitena_api__routes_sohbet__CustomerIn

FieldTypeLimitsMeaning
telefon *stringmin 10, max 32
adstring | nullmax 80
Terminal window
curl -s -X POST "$RZ_API/api/v1/sohbet-token" -H "Authorization: Bearer $RZ_KEY" -H "Content-Type: application/json" \
-d '{"musteri": {"telefon": "+905321234567", "ad": "Can Demir"}, "gecerlilik_sn": 600}'
{
"token": "eyJ2Ijox…",
"son_gecerlilik": "2026-10-26T10:25:00Z"
}

Error statuses: 401, 403, 404, 413, 422, 429 — see Errors and limits.