Web chat customer token
/api/v1/sohbet-token — POST
Section titled “/api/v1/sohbet-token — POST”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)
Request body (application/json)
Section titled “Request body (application/json)”Fields marked * are required. Unknown fields are rejected with 422.
CustomerTokenIn
| Field | Type | Limits | Meaning |
|---|---|---|---|
musteri * | zitena_api__routes_sohbet__CustomerIn | ||
gecerlilik_sn | integer | ≥ 60, ≤ 900, default 600 |
zitena_api__routes_sohbet__CustomerIn
| Field | Type | Limits | Meaning |
|---|---|---|---|
telefon * | string | min 10, max 32 | |
ad | string | null | max 80 |
Example
Section titled “Example”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}'Response 200
Section titled “Response 200”{ "token": "eyJ2Ijox…", "son_gecerlilik": "2026-10-26T10:25:00Z"}Error statuses: 401, 403, 404, 413, 422, 429 — see Errors and limits.
© 2026 Erusoft