live-chat

PATCH /v1/chat/widgets/{widgetId}

Change a chat's settings, or switch it on.

Sve live-chat krajnje tačke

Autentifikacija

Pošaljite API ključ kao bearer token. Ključ mora imati dozvolu livechat.manage; ključ bez nje se odbija sa 403, a ne sa 404.

Ovaj krajnji tačka ne prihvata ID organizacije. Vaš ključ već identifikuje organizaciju kojoj pripada, a odgovor je ograničen na nju.

Isprobajte

Zamenite bilo šta u uglastim zagradama sopstvenim vrednostima, a ključni placeholder sa ključem sa vaše kontrolne table.

curl -X PATCH https://api.zinndigital.com/v1/chat/widgets/{widgetId} \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Prijavljeni ste? API konzola na vašoj kontrolnoj tabli automatski popunjava ID vaše stvarne organizacije i vaš sopstveni ključ, i izvršava zahtev nad API-jem uživo tako da možete videti stvarni odgovor. Otvorite ovu krajnju tačku u API konzoli

Detalji

Requires `livechat.manage`. Switching a widget on with no `allowedOrigins` is refused with `422` rather than accepted: the widget only answers pages on origins the customer listed, so an empty list would leave the chat live, looking configured, and invisible on every page with nothing saying why.

Parametri

NazivVrstaObaveznoŠta je ovo
widgetId (path)stringDa

Telo zahteva

NazivVrstaObaveznoŠta je ovo
namestringNe
enabledbooleanNe
allowed_originsstring[]Ne
greetingstringNe
team_namestringNe
accent_colourstringNe
positionstring<left, right>Ne
hide_brandingbooleanNe
ai_enabledbooleanNe
offline_emailstringNe
business_hoursobjectNe

Odgovor

NazivVrstaObaveznoŠta je ovo
idstringDa
site_idstringDa
namestringDa
public_keystringDa
enabledbooleanDaWhether the chat renders. Created FALSE always: the plugin ships in the deploy footprint of every WordPress site we host, so a widget may exist for a customer who never asked fo…
allowed_originsstring[]DaOrigins the widget may be embedded on. An EMPTY list refuses every page rather than allowing any — this is the only control stopping somebody else's site opening conversations a…
tierstringDa
greetingstringDa
team_namestringDa
accent_colourstringDa
positionstring<left, right>Da
hide_brandingbooleanDa
ai_enabledbooleanDa
offline_emailstringDa
business_hoursobjectNe
open_nowbooleanDa
ai_allowanceChatAiAllowanceDa
limitsobjectDa
premium_extra_codestringDaThe catalogue code to buy for the premium tier.

Greške koje ovaj krajnji tačka može da vrati

401 · 403 · 404 · 422