DumGumDocs
Search documentation

Loading search…

API Reference

Chat History Endpoint

WEBHOOK · POSThttps://yourdomain.com/your/path

Get the chat history for a given user and persona.

Parameters

#userProfileId query · stringrequired

Your user profile id. The user profile interacting with the Persona profile.

Type: string
#personaProfileId query · stringrequired

Your persona profile id. The profile for which the platform will generate responses.

Type: string

Responses

#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 itemsType: object
#id stringrequired

The unique identifier of the message. This is used by our system to deduplicate messages.

Type: string
#sender stringrequired

The sender of the message. Possible values are USER and PERSONA.

  • USER represents a user message ;
  • PERSONA represents a message sent by a persona (the profile for which we are going to generate content).
Type: string

Allowed values: "USER", "PERSONA"

#date stringrequired

Message timestamp in ISO-8601 format.

Type: stringformat: "date-time"
#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?://.*"
#Array itemsType: stringpattern: "^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?://.*"
#Array itemsType: stringpattern: "^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?://.*"
#Array itemsType: stringpattern: "^https?://.*"
#audioLevelsDb object

Measured 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: object

#Additional properties

Type: numberformat: "double"
#poke boolean

Flag the message as a poke, our chat models will react to it.

Type: boolean
#gifts array

Flag the message as a gift, our chat models will react to it.

Type: array
#Array itemsType: object
#name stringrequired

The name of the gift.

Type: string
#tier stringrequired

The value of the gift.

Type: string

Allowed values: "LOW", "MEDIUM", "HIGH", "VERY_HIGH"

#sticker string

A text description of a sticker sent alongside the message. Our chat models will react to it naturally.

Type: stringminLength: 0 maxLength: 160
#text string

Message's text content, can be null if the message does not contains text.

Type: stringminLength: 0 maxLength: 512
Illustrative 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>"
    }
  ]
}