{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/ConnectionWebhook",
  "title": "Connection webhook",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "example": "ba29118f-5406-4e59-b05c-ba307ca38d01",
      "description": "Unique identifier of the event."
    },
    "eventType": {
      "type": "string",
      "description": "The type of event.",
      "examples": [
        "connection.created",
        "connection.connected",
        "connection.disconnected",
        "connection.reconnected",
        "connection.deleted",
        "connection.failed"
      ]
    },
    "generatedDate": {
      "$ref": "#/components/schemas/DateTime",
      "description": "The date time in UTC the event was generated in Codat."
    },
    "payload": {
      "$ref": "#/components/schemas/ConnectionWebhook/definitions/connectionWebhookPayload"
    }
  },
  "definitions": {
    "connectionWebhookPayload": {
      "title": "Connection webhook payload",
      "type": "object",
      "properties": {
        "referenceCompany": {
          "$ref": "#/components/schemas/Company/definitions/companyReference"
        },
        "connection": {
          "$ref": "#/components/schemas/Connection"
        }
      }
    }
  }
}