API Reference
Chat History Endpoint
https://yourdomain.com/your/pathGet the chat history for a given user and persona.
Parameters
userProfileId query · stringrequiredYour user profile id. The user profile interacting with the Persona profile.
Type:stringpersonaProfileId query · stringrequiredYour persona profile id. The profile for which the platform will generate responses.
Type:stringResponses
#200 Response
Chat history data fetched successfully. Your endpoint will respond with the appropriate JSON data.
#application/json
Type:object#messages arrayrequired
The conversation messages, oldest first.
Type:array#Array items
Type:objectid stringrequiredThe unique identifier of the message. This is used by our system to deduplicate messages.
Type:stringsender stringrequiredThe sender of the message. Possible values are USER and PERSONA.
USERrepresents a user message ;PERSONArepresents a message sent by a persona (the profile for which we are going to generate content).
stringAllowed values: "USER", "PERSONA"
#pictureUrls array
The URL of the image associated with the message. This will be analyzed if the vision is enabled for the current request.
Type:arraypattern: "^https?://.*"#videoUrls array
The URLs of the videos associated with the message. These will be analyzed if the vision is enabled for the current request.
Type:arraypattern: "^https?://.*"#audioUrls array
The URLs of the voice messages the user sent with this message. These will be transcribed and analysed, and the persona replies to what was actually said. Inbound only: the persona does not send voice messages back.
Type:arraypattern: "^https?://.*"audioLevelsDb objectMeasured loudness of each voice message, in dBFS, keyed by its URL. Optional and partial — send what you can measure.
Not required: a level you do not send is measured server-side instead. Sending it saves that round-trip, and is worth doing if measuring is cheap for you — the browser and iOS both give it away while recording.
What it is for: recognising a recording that captured nothing (a muted or unplugged mic) without asking a model, and telling the model how loud the file actually is. A missing level is read as unknown, never as silence.
Type:objectsticker stringA text description of a sticker sent alongside the message. Our chat models will react to it naturally.
Type:stringminLength: 0 maxLength: 160text stringMessage's text content, can be null if the message does not contains text.
stringminLength: 0 maxLength: 512Illustrative example
{
"messages": [
{
"id": "<string>",
"sender": "USER",
"date": "2023-04-25T10:00:00Z",
"pictureUrls": [
"<string>"
],
"videoUrls": [
"<string>"
],
"audioUrls": [
"<string>"
],
"audioLevelsDb": {},
"poke": false,
"gifts": [
{
"name": "Champagne & Roses",
"tier": "LOW"
}
],
"sticker": "<string>",
"text": "<string>"
}
]
}