KIVEX

Webhook events

The events your systems can subscribe to, and the data each one carries.

Every webhook has the same body: id, type, version, timestamp, siteId and data, plus personal when the subscription includes personal data. data depends on type and never holds personal data. Handle each id once: a delivery can arrive more than once. See Webhooks for signatures and retries.

inquiry.created

A new inquiry for the operator: from the chatbot's contact capture, an external agent or the operator's API. No personal data: consumers read the inquiry through the API.

Version 1. data:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "inquiryId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "siteId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "sitePublicId": {
      "type": "string",
      "pattern": "^wgt_[a-z0-9]{8,64}$"
    },
    "source": {
      "type": "string",
      "enum": [
        "chatbot",
        "external_agent",
        "api"
      ]
    },
    "conversationId": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "new",
        "contacted",
        "qualified",
        "closed"
      ]
    }
  },
  "required": [
    "inquiryId",
    "siteId",
    "sitePublicId",
    "source",
    "conversationId",
    "status"
  ]
}

inquiry.updated

An inquiry changed: its status, its note, or details the conversation summary added. changed names the fields; no personal data.

Version 1. data:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "inquiryId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "siteId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "sitePublicId": {
      "type": "string",
      "pattern": "^wgt_[a-z0-9]{8,64}$"
    },
    "status": {
      "type": "string",
      "enum": [
        "new",
        "contacted",
        "qualified",
        "closed"
      ]
    },
    "changed": {
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "status",
          "note",
          "contact",
          "summary"
        ]
      }
    }
  },
  "required": [
    "inquiryId",
    "siteId",
    "sitePublicId",
    "status",
    "changed"
  ]
}

handoff.requested

A visitor asked the chatbot for a person and the conversation waits for one. Take it over with handoff.takeover or in the Hub.

Version 1. data:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "conversationId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "siteId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "sitePublicId": {
      "type": "string",
      "pattern": "^wgt_[a-z0-9]{8,64}$"
    },
    "trigger": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "inquiryId": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "conversationId",
    "siteId",
    "sitePublicId",
    "trigger",
    "inquiryId"
  ]
}

handoff.message

The visitor wrote during a handover. No text by default: read it with handoff.get, or switch personal data on in the subscription.

Version 1. data:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "conversationId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "siteId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "sitePublicId": {
      "type": "string",
      "pattern": "^wgt_[a-z0-9]{8,64}$"
    },
    "messageId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    }
  },
  "required": [
    "conversationId",
    "siteId",
    "sitePublicId",
    "messageId"
  ]
}

handoff.ended

A handover ended: given back to the chatbot or the conversation was closed.

Version 1. data:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "conversationId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "siteId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "sitePublicId": {
      "type": "string",
      "pattern": "^wgt_[a-z0-9]{8,64}$"
    },
    "outcome": {
      "type": "string",
      "enum": [
        "returned_to_bot",
        "resolved",
        "conversation_ended"
      ]
    },
    "endedBy": {
      "type": "string",
      "enum": [
        "hub_operator",
        "api",
        "visitor",
        "system"
      ]
    }
  },
  "required": [
    "conversationId",
    "siteId",
    "sitePublicId",
    "outcome",
    "endedBy"
  ]
}

On this page