Server-side API
The ScentBot API allows you to integrate conversational fragrance recommendations into your own chat interface. Instead of embedding the widget, your backend communicates directly with ScentBot, giving you full control over the UI while ScentBot handles the AI conversation. The API is stateful — each conversation is tracked through a session ID that you generate and manage.Authentication
All requests require a Bearer token in theAuthorization header:
The API key is provided by the ScentXP team. Contact your account manager to obtain one.
Base URL
All endpoints are relative to the ScentBot API base URL provided during onboarding.Endpoints
Initialize a session
Creates a new conversation session. Call this before sending any user messages.
Response (200)
message field contains the welcome text to display to the user. The session is now active and ready to receive messages.
Send a user message
Sends the user’s input to ScentBot and returns the assistant’s response with optional perfume recommendations and interactive elements.
Response (200)
The response contains the assistant’s
message and an optional metadata array with interactive elements and perfume data.
session_id. Each subsequent call builds on previous messages, allowing follow-up questions and refinements.
Parsing the response
Perfume recommendations in the message
When ScentBot recommends fragrances, it embeds<parfum /> XML tags inline in the message string. This allows you to render perfume cards at the correct position within the conversation text.
Each <parfum /> tag contains:
Parse the message to extract these tags and render them as product cards in your UI, preserving their position relative to the surrounding text.
Product mapping via metadata
To map recommended fragrances to products in your catalog, look for metadata entries withtype: "tool_response" and a result of type OutputParfumSearch. This contains the EAN codes for each fragrance:
items provides:
Use the
eans array to look up the product in your own catalog and link to the corresponding product page.
Interactive elements
Themetadata array may contain interactive elements that ScentBot uses to guide the conversation. These have type: "tool_interactable" and contain a content array of action items.
Buttons
Displayed when ScentBot needs the user to make a choice (e.g., gender preference):Family selection
Displayed when ScentBot asks the user to pick a fragrance family:Ending options
Displayed at the end of a recommendation flow:label text as the user_input in the next /v1/recommend call to continue the conversation.
Interactive element fields
Integration flow
A typical integration follows this sequence:1
Generate a session ID
Create a unique alphanumeric session ID for each user conversation. Store it on your server.
2
Initialize the session
Call
POST /v1/bootstrap with the session ID, language, and public key. Display the returned welcome message.3
Send user messages
Each time the user types a message or selects an interactive element, call
POST /v1/recommend with the same session ID.4
Render the response
Parse the
message for <parfum /> tags and render product cards inline. Display any interactive elements from metadata as buttons.5
Map products to your catalog
Use the
OutputParfumSearch metadata to map fragrance IDs to EAN codes, then look up the corresponding products in your catalog.Next steps
Capabilities
What ScentBot can do — search types, image search, multi-language.
Catalog Integration
Set up the Product Feed that scopes ScentBot recommendations.

