DumGumDocs
Search documentation

Loading search…

API Reference

answer.created

Schema

This event is emitted when a generated answer has been fully produced and sent. It marks the successful completion of the answer generation process and delivers the finalized answer payload

Type: object
#projectId stringrequired

The unique identifier of the project in which the answer was generated.

Type: string
#answer objectrequired

An object representing the final answer produced by the platform.

Type: object
#id stringrequired

Unique id of this answer, assigned by us. Use it to deduplicate answers on your side: the same answer delivered twice (retry, webhook redelivery) always carries the same id.

Type: string
#userProfileId stringrequired

Id of the user profile this answer is addressed to. Same value as the userProfile.id you sent in the request.

Type: string
#personaProfileId stringrequired

Id of the persona profile that wrote this answer. Same value as the personaProfile.id you sent in the request.

Type: string
#message objectrequired

What the persona sends to the user: text, media, or both. This is the part you display in your chat.

Type: object
#text string

The message written by the persona, in the conversation language, ready to be displayed to the user as-is. Omitted when the answer carries media without any accompanying text.

Type: string
#pictureUrls array

Urls of the pictures the persona shares with this message, taken from the media you registered for the persona profile. Display them together with text, in the given order. Omitted when no picture is shared.

Type: array
#Array itemsType: string
#videoUrls array

Urls of the videos the persona shares with this message, taken from the media you registered for the persona profile. Display them together with text, in the given order. Omitted when no video is shared.

Type: array
#Array itemsType: string
#sequenceNumber integerrequired

Position of this message within the reply, starting at 0. A single generation request can produce several messages (the persona "double texting"); each one is delivered as a separate answer sharing the same reply. Display them in ascending order to preserve the persona's intent.

Type: integerformat: "int32" default: "0"
#typingTime integer

How long, in milliseconds, the persona is supposed to be typing this message before it appears to the user. Use it to render a typing indicator and pace the delivery, so the conversation feels human.

When the answer is delivered through a webhook, we already apply this delay for you: an answer.processing event is sent first, then the answer is sent after the delay (clamped between 1000 ms and 90000 ms). Omitted when the message is meant to be delivered instantly.

Type: integerformat: "int32"
#tags objectrequired

The tags you attached to the generation request, returned unchanged. Use them to link the answer back to your own records (campaign, A/B test, operator, …) for tracking and statistics.

Type: object

#Additional properties

Type: string
#cost stringrequired

What this answer costs you, in your account currency, as a decimal string with 4 decimals (format 0.0000).

It is returned as a string so no precision is lost when you parse it. When a reply contains several messages, the whole reply is billed once on the first answer and the following ones report 0.0000.

Type: string
#conversationStopReason string,null

Why we stopped this conversation, or null when the conversation can continue normally.

When set, the user has been banned from the conversation until conversationStoppedUntil: stop sending us new messages for this user and persona pair until that date, and handle the user on your side (block, warn, close the chat) according to the reason. You may still receive a final message to deliver, depending on the guardrail settings of your project.

Most bans are progressive and grow with each repeated offence: 2 hours → 12 hours → 24 hours → 48 hours → permanent.

You can override those durations per project for the guardrails that expose an option set. The jailbreak (USER_SUSPICIOUS) and hostility (USER_HOSTILE) bans always use the platform values, and hostility never escalates — it is always 24 hours.

ValueMeaningDefault ban
USER_UNDERAGEThe user appears to be a minor (under 18).Permanent
MALICIOUS_CONTENTSexual content targeting minors, animals or close relatives.Progressive
USER_SUSPICIOUSThe user is trying to hijack the AI (prompt hacking).Progressive
USER_MESSAGE_REPETITIONThe user keeps sending the same message.Progressive
UNKNOWN_LANGUAGEThe user writes in a language we could not identify.Progressive
USER_HOSTILEThe user is hostile toward the persona.24 hours
AI_SUSPICIOUSThe user suspects the persona is an AI.Progressive
PAUSE_CONVERSATIONYou asked us to pause the conversation in replyParameters.Your duration
Type: string | nulldefault: null

Allowed values: "USER_UNDERAGE", "MALICIOUS_CONTENT", "USER_SUSPICIOUS", "USER_MESSAGE_REPETITION", "UNKNOWN_LANGUAGE", "USER_HOSTILE", "AI_SUSPICIOUS", "PAUSE_CONVERSATION"

#conversationStoppedUntil string,null

Date at which the conversation can resume, in UTC. null when no ban is in effect.

Set together with conversationStopReason. A permanent ban is expressed as a date roughly a century in the future, so you can always compare this date with the current time instead of special-casing permanent bans.

Type: string | nulldefault: null
#responseTime integerrequired

How long we took to produce this answer, in seconds, measured from the moment we accepted your request. It includes the time spent waiting in our queue, so it is not the pure generation time.

Type: integerformat: "int64"
#parentAnswerId string,null

Id of the answer this one follows within the same reply, when the persona sends several messages in a row. null for the first (or only) answer of a reply. Chain the answers through this property to display them in the right order.

Type: string | nulldefault: null
#createdAt stringrequired

When this answer was generated, in UTC. Format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX (ISO-8601).

Type: stringformat: "date-time"