DumGum uses a push model to deliver created content to your service. To receive data via a POST request, you must implement this endpoint on your end. Your endpoint must implement the Incoming Content OpenAPI webhook specification.

Request Schema

event
string
required
Event type, available types are:
ValueDescription
answer.createdEmitted when a generated answer is sent.
answer.processingEmitted when the generation of an answer starts.
conversation.droppedEmitted when the conversation exceeds the maximum processing time and no answer could be generated.
data
object
required
The data object varies for each event type. You will find the details of each data structure below.

Event Data Structures

answer.created

Emitted upon generation of an answer.
answer
object
required
Contains a ContentCreationAnswer object.

Example for a TEXT answer

{
  "event": "answer.created",
  "data": {
    "answer": {
      "id": "answer_XXXXXXXXXXXXXXX",
      "projectId": "proj_XXXXXXX",
      "type": "TEXT",
      "userProfileId": "2246",
      "personaProfileId": "1081332",
      "replyMode": "HUMAN",
      "text": "hello world",
      "pictureUrl": null,
      "tags": { "banana": "yellow" },
      "conversationStopReason": null,
      "conversationStoppedUntil": null
    }
  }
}

Example for a ACTION_POKE answer

{
  "event": "answer.created",
  "data": {
    "answer": {
      "id": "answer_XXXXXXXXXXXXXXX",
      "projectId": "proj_XXXXXXX",
      "type": "ACTION_POKE",
      "userProfileId": "2246",
      "personaProfileId": "1081332",
      "replyMode": "HUMAN",
      "text": null,
      "pictureUrl": null,
      "tags": { "banana": "yellow" },
      "conversationStopReason": null,
      "conversationStoppedUntil": null
    }
  }
}
Example of a TEXT answer with a conversation stop reason of UNDERAGE_USER, resulting in a lifetime stop.
{
  "event": "answer.created",
  "data": {
    "answer": {
      "id": "answer_XXXXXXXXXXXXXXX",
      "projectId": "proj_XXXXXXX",
      "type": "TEXT",
      "userProfileId": "2246",
      "personaProfileId": "1081332",
      "replyMode": "HUMAN",
      "text": "i can't talk with minors",
      "pictureUrl": null,
      "tags": { "banana": "yellow" },
      "conversationStopReason": "UNDERAGE_USER",
      "conversationStoppedUntil": "2099-03-01T00:00:00Z"
    }
  }
}

answer.processing

Emitted when a conversation enters processing.
It can be used to display a “Persona is typing…” message on your user’s chat interface.
projectId
string
required
References a project id.
userProfileId
string
required
References a user profile id.
personaProfileId
string
required
References a persona profile id.
replyMode
enum
required
Requested reply mode, can be AI or HUMAN.
tags
object
required
An key/value object. Example: { "key": "value" }

Example

{
  "event": "answer.processing",
  "data": {
  "projectId": "proj_XXXXXXX",
    "userProfileId": "2246",
    "personaProfileId": "1081332",
    "replyMode": "HUMAN",
    "tags": { "banana": "yellow" }
  }
}

conversation.dropped

Emitted when a conversation exceeds the maximum processing time specified at enqueue.
On receipt of this event, you may requeue the conversation or take no action.
projectId
string
required
References a project id.
userProfileId
string
required
References a user profile id.
personaProfileId
string
required
References a persona profile id.
replyMode
enum
required
Requested reply mode, can be AI or HUMAN.
tags
object
required
An key/value object. Example: { "key": "value" }

Example

{
  "event": "conversation.dropped",
  "data": {
    "projectId": "proj_XXXXXXX",
    "userProfileId": "2246",
    "personaProfileId": "1081332",
    "answerId": "answer_XXXXXXXXXXXXXXX",
    "replyMode": "HUMAN",
    "tags": { "banana": "yellow" }
  }
}