hosting
POST /v1/sites/{siteId}/chat-agent
Switch on the chat agent for this site.
પ્રમાણીકરણ
બિયરર ટૉકન તરીકે API કી મોકલો. આ એન્ડપૉઇન્ટ સ્પેશિફિકેશનમાં કોઈ ચોક્કસ પરવાનગી જણાવતું નથી, તેથી ધારણા બાંધવાને બદલે તમારી કીને તેની જરૂરિયાત મુજબ ન્યૂનતમ પરવાનગી આપો અને રિસ્પોન્સ તપાસો.
આ એન્ડપૉઇન્ટ કોઈ સંસ્થા આઈડી (organisation id) લેતું નથી. તમારી કી (key) પહેલેથી જ તે જે સંસ્થા સાથે સંબંધિત છે તેની ઓળખ કરે છે, અને પ્રતિસાદ (response) તે જ પૂરતો મર્યાદિત છે.
આયમાવો
કોઈપણ કૌંસમાં રહેલી બાબતને તમારા પોતાના મૂલ્યોથી બદલો અને કી પ્લેસહોલ્ડરને તમારા ડેશબોર્ડની કીથી બદલો.
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/chat-agent \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'साइन ઇન કરેલ છે? તમારા ડેશબોર્ડમાં આવેલું API કન્સોલ તમારી વાસ્તવિક સંસ્થાની આઈડી અને તમારી પોતાની કી ભરે છે, અને લાઇવ API સામે વિનંતી ચલાવે છે જેથી તમે વાસ્તવિક પ્રતિસાદ જોઈ શકો. આ અંતિમબિંદુને API કન્સોલમાં ખોલો
વિગતો
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.
પેરામીટર્સ
| નામ | પ્રકાર | જરૂરી | તે શું છે |
|---|---|---|---|
siteId (path) | Uuid | હા | Site ID (UUIDv7). |
રિકવેસ્ટ બોડી
| નામ | પ્રકાર | જરૂરી | તે શું છે |
|---|---|---|---|
name | string | ના | — |
greeting | string | ના | — |
persona | string | ના | — |
brand_colour | string | ના | — |
launcher_position | string<left, right> | ના | — |
handoff_enabled | boolean | ના | — |
status | string<active, paused> | ના | — |
allowed_origins | string[] | ના | — |
monthly_message_cap | integer | ના | — |
જવાબ
| નામ | પ્રકાર | જરૂરી | તે શું છે |
|---|---|---|---|
id | string | હા | — |
site_id | string | ના | — |
name | string | હા | What the agent calls itself to visitors. The customer's brand, not ours. |
greeting | string | ના | — |
persona | string | ના | 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_colour | string | ના | — |
launcher_position | string<left, right> | ના | — |
status | string<active, paused> | હા | paused stops it answering and keeps everything it has learned, so switching back on is instant rather than a re-index. |
handoff_enabled | boolean | ના | Offer to pass the visitor to a person when the agent cannot answer. |
public_key | string | હા | Carried 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_origins | string[] | હા | Origins the public endpoints will answer for. ⛔ Empty refuses everything — it means "not installed yet", never "allow anything". |
monthly_message_cap | integer | ના | Messages included per calendar month. Checked before each answer. |
messages_this_month | integer | ના | — |
indexed_chunks | integer | ના | Passages of the site currently searchable. Zero means it knows nothing yet. |
embed_snippet | string | ના | The two lines to paste into any website. |
sources | ChatAgentSource[] | હા | — |
આ એન્ડપોઇન્ટ જે ભૂલો પરત કરી શકે છે
401 · 403 · 404 · 422