hosting

POST /v1/sites/{siteId}/chat-agent

Switch on the chat agent for this site.

Gbogbo àwọn hosting endpoints

Gbogbo àwọn ìwé àṣẹ olùgbékalẹ̀ àgbékalẹ̀

Ìfàṣẹ́pọ̀

Fi bọ́kì kọ́kọ́ (bearer token) ránṣẹ́ gẹ́gẹ́ bí àmì ìdánimọ̀ API. Ibùdó yìí kò sọ àṣẹ pàtó kan nínú àlàyé rẹ̀, nítorí náà fún kọ́kọ́ rẹ̀ ní ohun tó kéré jù lọ tí ó nílò kí o sì ṣàyẹ̀wò ìdáhùn náà dípò kí o kàn rò ó.

Ojú abánisọ̀rọ̀ yìí kò gba id ajọ kankan. Kọ́kọ́rọ́ rẹ ti mọ ajọ ti o jẹ ti e, a o si fèsì nipa rẹ̀.

Gbiyanju rẹ

Rọ́pọ̀ èyíkéyìí nínú àwọn àmì ìtọ́ka < > pẹ̀lú iye tirẹ̀, àti àmì ìdánimọ̀ bọ́tìnnì náà pẹ̀lú bọ́tìnnì kan láti inú dásibọ̀ọ̀dù rẹ.

curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/chat-agent \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Ṣé o ti wọlé? Iwọ̀n api ní nú ìgbékalẹ̀ rẹ kún id àjọ gidi rẹ ati bọtini tirẹ, o si nṣiṣẹ ibeere na lòdì si api gidi ki o le rii esi gidi na. Ṣí ojú abáná yìí sílẹ̀ nínú kọnsólù API

Àwọn kúlẹ̀kúlẹ̀

Creates the agent, named after the site and pre-authorised for the site's own domains so the snippet works the moment it is pasted. ⛔ Refuses with 422 when the product has not been bought for this site, or when the account is not in good standing — two different refusals with two different remedies, told apart by the code in the error details (not_purchased / not_in_good_standing). A suspension is not cleared by credit, so that refusal deliberately offers no top-up. Calling it twice returns the existing agent with 200 rather than an error.

Àwọn ìpìlẹ̀

OrúkọIruTí a nílòKini o jẹ
siteId (path)UuidBẹẹniSite ID (UUIDv7).

Akoonu ibeere naa

OrúkọIruTí a nílòKini o jẹ
namestringBẹẹkọ
greetingstringBẹẹkọ
personastringBẹẹkọ
brand_colourstringBẹẹkọ
launcher_positionstring<left, right>Bẹẹkọ
handoff_enabledbooleanBẹẹkọ
statusstring<active, paused>Bẹẹkọ
allowed_originsstring[]Bẹẹkọ
monthly_message_capintegerBẹẹkọ

Idahun

OrúkọIruTí a nílòKini o jẹ
idstringBẹẹni
site_idstringBẹẹkọ
namestringBẹẹniWhat the agent calls itself to visitors. The customer's brand, not ours.
greetingstringBẹẹkọ
personastringBẹẹkọFree text describing tone and what to say. ⛔ It cannot widen what the agent may read — retrieval decides that before the model sees anything.
brand_colourstringBẹẹkọ
launcher_positionstring<left, right>Bẹẹkọ
statusstring<active, paused>Bẹẹnipaused stops it answering and keeps everything it has learned, so switching back on is instant rather than a re-index.
handoff_enabledbooleanBẹẹkọOffer to pass the visitor to a person when the agent cannot answer.
public_keystringBẹẹniCarried in the embed snippet. It identifies the agent and authorises nothing a page's reader could not already do — the fence is allowed_origins.
allowed_originsstring[]BẹẹniOrigins the public endpoints will answer for. ⛔ Empty refuses everything — it means "not installed yet", never "allow anything".
monthly_message_capintegerBẹẹkọMessages included per calendar month. Checked before each answer.
messages_this_monthintegerBẹẹkọ
indexed_chunksintegerBẹẹkọPassages of the site currently searchable. Zero means it knows nothing yet.
embed_snippetstringBẹẹkọThe two lines to paste into any website.
sourcesChatAgentSource[]Bẹẹni

Awọn aṣiṣe ti ibudo ipari yii le da pada

401 · 403 · 404 · 422