Zum Inhalt springen

Widget

Embeddable support widget for customer websites.

GET /widget.js

Script to include in your website. It injects a floating support button that opens the ticket form (/widget.html) in an iframe.

<script src="https://exocortex-api.ai-exo-cortex.com/widget.js?tenant=ACME&key=pk_live_3f9a1c2e" async></script>

Authentifizierung: Keine: Die Anfrage wird durch die oben beschriebene Signatur authentifiziert.

Name Ort Typ Pflicht Beschreibung
tenant Query string ja
key Query string ja Public widget key.
Status Beschreibung
200 JavaScript loader.

Beispiel 200

(function(){ /* exoCortex widget loader */ })();
Finestra del terminale
curl -X GET "https://exocortex-api.ai-exo-cortex.com/widget.js?tenant=ACME&key=pk_live_3f9a1c2e"

GET /widget.html

The HTML form rendered inside the widget iframe. You normally don’t call it directly; /widget.js loads it.

Authentifizierung: Keine: Die Anfrage wird durch die oben beschriebene Signatur authentifiziert.

Name Ort Typ Pflicht Beschreibung
tenant Query string ja
key Query string ja Public widget key.
Status Beschreibung
200 HTML document.

Beispiel 200

<!DOCTYPE html><html>…</html>
Finestra del terminale
curl -X GET "https://exocortex-api.ai-exo-cortex.com/widget.html?tenant=ACME&key=pk_live_3f9a1c2e"

POST /api/v1/widget/submit

Used by the widget form. Limited to 30 submissions per hour per client IP and tenant. If the tenant enabled Cloudflare Turnstile, a valid cf_turnstile_token is required.

Authentifizierung: Öffentlicher Widget-Schlüssel: X-NH-Widget-Key: pk_…

application/json

Name Typ Pflicht Beschreibung
tenant string ja Must match the widget key’s tenant.
email string (email) ja
name string nein
subject string ja
description string ja
category string nein
origin string nein Page URL where the widget was used.
cf_turnstile_token string nein Cloudflare Turnstile token. Required if the tenant enabled Turnstile. You can also send it in the X-NH-Turnstile header.
{
"tenant": "ACME",
"email": "[email protected]",
"name": "Maria Rossi",
"subject": "Cannot download my invoice",
"description": "The invoice page shows an empty PDF for October.",
"category": "Billing",
"origin": "https://www.example.com/account",
"cf_turnstile_token": "0.xY2fake-turnstile-token"
}
Status Beschreibung
200 Ticket created.
400 Invalid request.
401 Not authenticated.
403 Authenticated but not allowed (role, tenant or key).
429 Too many submissions from this IP (30 per hour).
500 Unexpected server error.

Beispiel 200

{
"ok": true,
"ticket_key": "ACME-1043",
"ingestion_id": "ing_2c71f0aa"
}
Finestra del terminale
curl -X POST "https://exocortex-api.ai-exo-cortex.com/api/v1/widget/submit" \
-H "X-NH-Widget-Key: $EXO_WIDGET_KEY" \
-H "Content-Type: application/json" \
--data '{"tenant":"ACME","email":"[email protected]","name":"Maria Rossi","subject":"Cannot download my invoice","description":"The invoice page shows an empty PDF for October.","category":"Billing","origin":"https://www.example.com/account","cf_turnstile_token":"0.xY2fake-turnstile-token"}'

Seite generiert aus der OpenAPI-Spezifikation der Integrations-API, Version 1.1.0.