Informio for developers

Embed chat, Search or build your own interface

Add the ready-made chat widget or Informio Search to your website. Build custom interfaces with the public API, allowed domains, localization and your assistant's existing data.

Simplest deployment

A complete widget with one script

First allow your website domain in the assistant settings. Then replace ASSISTANT_ID with the public assistant ID and insert the code into the page. The widget loads its appearance, labels, and conversation history automatically.

HTML
<script src="https://informio.eu/widget.js" data-assistant="ASSISTANT_ID" defer></script>

Place the code before the closing </body> tag. The defer attribute keeps page loading non-blocking, and the widget works on desktop and mobile.

Allowed domain

The request Origin must match a domain allowed in the assistant settings. Browsers send it automatically.

Stable session

Your random session_id preserves chat history between messages and when the client is opened again.

Public assistant ID

The assistant ID is not a secret API key. Never put secrets or AI provider credentials in the client.

Informio Search

Embed a ready-made search experience

The script renders the field, suggestions and results and calls the Informio API itself. No search backend is needed on the host website.

  1. 1.Allow your website's domain in the assistant settings. Open Search, enable it, select public website/XML sources and save.
  2. 2.Copy the generated code from the administration. In this example, replace ASSISTANT_ID with your assistant's public ID.
  3. 3.Paste the code into an HTML template or a custom HTML block that permits scripts. Search initializes when the page loads.
Explore Informio Search
HTML
<div id="informio-search"></div>
<script src="https://informio.eu/search.js"
  data-assistant="ASSISTANT_ID"
  data-target="#informio-search" defer></script>

data-target is a CSS selector for an existing container; omit it to place the field at the script's location. Container IDs must be unique. Use a separate script and container for each search field.

In React/Vue or another SPA, keep the container in a persistent layout and load the script once after creating it with document.createElement('script'). Scripts inserted through innerHTML do not execute. For components that mount and unmount frequently, use the API below for your own interface.

Appearance and result placement

Color, theme, corners and language come from the assistant. Choose inline or modal results and an optional AI summary in Search. Shadow DOM isolates the UI from host styles.

Sources and links

Selected website/XML sources need public HTTP(S) URLs. Standalone MD and document sources are not supported. Results use the latest synchronized data.

Plan usage

Autocomplete makes no AI calls. One successful confirmed AI search, including its optional summary, uses one organization response.

Build your own interface with the Search API

Use this API for a custom interface. The ready-made search.js already handles all requests. Search needs no session_id or secret API key.

GET/api/search/{assistant}

Returns appearance, language, display mode, branding and localized labels.

GET/api/search/{assistant}/suggest?q=wellness

Text suggestions without AI, up to 6 results. The required q parameter accepts 3–300 characters.

POST/api/search/{assistant}/results

The JSON body contains q with 3–300 characters. Returns up to 24 results, an optional summary, mode and notice.

Send Accept: application/json and Content-Type: application/json for POST. Browsers send Origin automatically; the domain must be allowed. Accept-Language selects the locale when the assistant uses automatic language. Debounce suggestions by 300 ms and cancel stale requests.

JavaScript
const assistantId = 'ASSISTANT_ID';
const query = 'wellness';
const response = await fetch(
  `https://informio.eu/api/search/${assistantId}/results`,
  {
    method: 'POST',
    credentials: 'omit',
    headers: {
      Accept: 'application/json',
      'Content-Type': 'application/json',
      'Accept-Language': document.documentElement.lang || 'en',
    },
    body: JSON.stringify({ q: query }),
  },
);
if (!response.ok) throw new Error(String(response.status));
const { results, summary, mode, notice } = await response.json();
const container = document.querySelector('#custom-search-results');
container.replaceChildren();
for (const item of results) {
  const url = new URL(item.url);
  if (!['https:', 'http:'].includes(url.protocol)
    || url.username || url.password) continue;
  const link = document.createElement('a');
  link.href = url.href;
  link.textContent = item.title;
  container.append(link);
}
JSON
{
  "results": [
    {
      "title": "Wellness and opening hours",
      "url": "https://example.com/wellness",
      "type": "page",
      "excerpt": "Pool, saunas and practical information before your visit.",
      "image_url": null,
      "price": null,
      "currency": null,
      "in_stock": null
    }
  ],
  "summary": null,
  "mode": "ai",
  "notice": null
}

results contains cards; type is page, article, product, event or profile. Image, price, currency and stock may be null. summary is text or null; mode is ai or text and notice is a localized message or null. The list is limited to 24 results without pagination.

The JavaScript example expects your own #custom-search-results container and renders links. Render excerpts, summary and notice using textContent, not innerHTML. Validate HTTP(S) URLs and load images only when image_url is present.

Limits and text mode

Configuration and suggestions share a limit of 120 requests per minute per assistant/IP. Results allow 20 per minute per assistant/IP. On 429, respect Retry-After.

AI failure or an exhausted plan can return HTTP 200 with mode: text and text results without consuming a response. If only the summary fails, mode stays ai, summary is null and the results count as one AI search.

Download OpenAPI

Error responses

403
Domain is not allowed.
404
Assistant not found, still a draft or Search is disabled.
422
Missing or invalid q parameter.
423
Assistant is paused or blocked by the quality gate.
429
Request limit exceeded; retry after Retry-After.

Quick start

Get your first API answer

Replace ASSISTANT_ID with the public ID from the assistant settings. Send the same session_id throughout the conversation.

Base URL

https://informio.eu/api
curl --request POST \
  --url https://informio.eu/api/widget/ASSISTANT_ID/messages \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'Origin: https://example.com' \
  --data '{
    "session_id": "visitor-session-01JEXAMPLE1234567890",
    "message": "When are you open?"
  }'

API reference

Public Widget API

Stable endpoints used by the official Informio widget.

GET/widget/{assistant}

Assistant configuration

Returns the name, appearance, labels, operator availability, and existing history for a session.

POST/widget/{assistant}/messages

Send a message

Sends a visitor question and returns an answer, products, or the current human handoff state.

GET/widget/{assistant}/sync

Synchronise chat

Loads new operator messages, takeover state, and conversation completion without refreshing the whole interface.

POST/widget/{assistant}/handoff

Request an operator

Asks the available team to take over the conversation when human handoff is enabled for the assistant.

POST/widget/{assistant}/page-view

Track visitor navigation

Associates a visited URL and page title with the conversation without form content or query parameters.

POST/widget/{assistant}/end

End and rate

Ends the current conversation and optionally stores a positive or negative visitor rating.

Recommended flow

One session from open to finish

The client only needs a public assistant ID, an allowed Origin, and a stable session_id.

1

Load the configuration

When chat opens, retrieve its appearance, labels, and the session's existing history.

2

Send messages

Send every question with the same session_id and include the current page on the web.

3

Keep in sync

After requesting a person, regularly load new messages and the operator state.

Machine-readable contract

Import the OpenAPI YAML into Postman or Insomnia, or use it to generate a client in your preferred language.

Download OpenAPI

Need to manage assistants through an API?

The public contract covers chat, widget and Search. Assistant and knowledge management APIs are not public; contact info@informio.eu to discuss your needs.

Turn your know-how into an assistant that answers 24/7.

Start without a payment card or API key. Default Informio AI is ready automatically, while your own OpenAI account or AI server remains optional.

FREE plan · 100 answers · no payment card