# Webhook event reference

> Generated from `apps/web/src/lib/developer-contracts/webhooks.ts` by `pnpm docs:developer:generate`.

All events use a CloudEvents 1.0 structured JSON envelope. The `data` schemas below are strict, versioned, and data-minimized.

## `com.elicitra.interaction.ended.v1`

**Delivery mode:** `lifecycle_subscription`

**Lifecycle sequence:** `1`

**Privacy classification:** `customer_personal_data`

Emitted once when an interaction first reaches its canonical terminal state.

- [Data JSON Schema](/developers/v14/schemas/webhooks/com.elicitra.interaction.ended.v1.schema.json)

### Example CloudEvent

```json
{
  "data": {
    "campaign": {
      "id": "campaign_01",
      "name": "Website qualification"
    },
    "consents": [
      {
        "granted": true,
        "scopeKey": "structured_extraction_and_lead_handoff"
      }
    ],
    "interaction": {
      "channel": "phone",
      "endedAt": "2026-07-31T12:00:00.000Z",
      "id": "call_01",
      "outcome": "completed",
      "reasonCode": "respondent_ended"
    },
    "lifecycleSequence": 1,
    "organization": {
      "id": "org_01"
    },
    "respondent": {
      "email": "ada@example.com",
      "name": "Ada",
      "phone": "+390212345678"
    },
    "scenario": {
      "id": "scenario_01",
      "name": "Website qualification",
      "revision": 4,
      "slug": "website_qualification"
    },
    "truncation": {
      "omittedFields": [],
      "truncated": false
    }
  },
  "datacontenttype": "application/json",
  "dataschema": "https://elicitra.eigen.rest/developers/v5/schemas/webhooks/com.elicitra.interaction.ended.v1.schema.json",
  "id": "018f769b-7a6a-7c32-9f3c-8399b27c33f1",
  "source": "https://elicitra.eigen.rest",
  "specversion": "1.0",
  "subject": "interactions/call_01",
  "time": "2026-07-31T12:00:00.000Z",
  "type": "com.elicitra.interaction.ended.v1"
}
```

## `com.elicitra.analysis.completed.v1`

**Delivery mode:** `lifecycle_subscription`

**Lifecycle sequence:** `2`

**Privacy classification:** `customer_personal_data`

Emitted after a valid structured analysis and ANALYSIS_READY commit.

- [Data JSON Schema](/developers/v14/schemas/webhooks/com.elicitra.analysis.completed.v1.schema.json)

### Example CloudEvent

```json
{
  "data": {
    "analysis": {
      "analysisAnswers": [
        {
          "answer": "A new website",
          "questionKey": "main_need"
        }
      ],
      "classifications": [
        {
          "axisKey": "urgency",
          "value": "medium"
        }
      ],
      "configuredAnswers": [
        {
          "fieldKey": "goal",
          "status": "answered",
          "value": "New website"
        }
      ],
      "insights": [
        "The requested scope is concrete."
      ],
      "missingFields": [],
      "openQuestions": [
        "Who approves the project?"
      ],
      "operatorHandoff": "Confirm the preferred timing.",
      "recommendedActions": [
        "Confirm timing and stakeholders."
      ],
      "riskNotes": [],
      "salesHandoff": "Follow up through the authorized channel.",
      "scores": {
        "completeness": 5,
        "intent": 4
      },
      "summary": "Ada requested a follow-up about the website project."
    },
    "campaign": {
      "id": "campaign_01",
      "name": "Website qualification"
    },
    "consents": [
      {
        "granted": true,
        "scopeKey": "structured_extraction_and_lead_handoff"
      }
    ],
    "interaction": {
      "channel": "phone",
      "endedAt": "2026-07-31T12:00:00.000Z",
      "id": "call_01",
      "outcome": "completed",
      "reasonCode": "respondent_ended"
    },
    "lifecycleSequence": 2,
    "organization": {
      "id": "org_01"
    },
    "respondent": {
      "email": "ada@example.com",
      "name": "Ada",
      "phone": "+390212345678"
    },
    "scenario": {
      "id": "scenario_01",
      "name": "Website qualification",
      "revision": 4,
      "slug": "website_qualification"
    },
    "truncation": {
      "omittedFields": [],
      "truncated": false
    }
  },
  "datacontenttype": "application/json",
  "dataschema": "https://elicitra.eigen.rest/developers/v5/schemas/webhooks/com.elicitra.analysis.completed.v1.schema.json",
  "id": "018f769b-7a6a-7c32-9f3c-8399b27c33f2",
  "source": "https://elicitra.eigen.rest",
  "specversion": "1.0",
  "subject": "interactions/call_01",
  "time": "2026-07-31T12:00:00.000Z",
  "type": "com.elicitra.analysis.completed.v1"
}
```

## `com.elicitra.analysis.failed.v1`

**Delivery mode:** `lifecycle_subscription`

**Lifecycle sequence:** `2`

**Privacy classification:** `customer_personal_data`

Emitted only after analysis reaches a terminal failed state.

- [Data JSON Schema](/developers/v14/schemas/webhooks/com.elicitra.analysis.failed.v1.schema.json)

### Example CloudEvent

```json
{
  "data": {
    "campaign": {
      "id": "campaign_01",
      "name": "Website qualification"
    },
    "consents": [
      {
        "granted": true,
        "scopeKey": "structured_extraction_and_lead_handoff"
      }
    ],
    "failure": {
      "category": "provider",
      "code": "analysis_provider_unavailable"
    },
    "interaction": {
      "channel": "phone",
      "endedAt": "2026-07-31T12:00:00.000Z",
      "id": "call_01",
      "outcome": "failed",
      "reasonCode": "technical_error"
    },
    "lifecycleSequence": 2,
    "organization": {
      "id": "org_01"
    },
    "respondent": {
      "email": "ada@example.com",
      "name": "Ada",
      "phone": "+390212345678"
    },
    "scenario": {
      "id": "scenario_01",
      "name": "Website qualification",
      "revision": 4,
      "slug": "website_qualification"
    },
    "truncation": {
      "omittedFields": [],
      "truncated": false
    }
  },
  "datacontenttype": "application/json",
  "dataschema": "https://elicitra.eigen.rest/developers/v5/schemas/webhooks/com.elicitra.analysis.failed.v1.schema.json",
  "id": "018f769b-7a6a-7c32-9f3c-8399b27c33f3",
  "source": "https://elicitra.eigen.rest",
  "specversion": "1.0",
  "subject": "interactions/call_01",
  "time": "2026-07-31T12:00:00.000Z",
  "type": "com.elicitra.analysis.failed.v1"
}
```

## `com.elicitra.automation.triggered.v1`

**Delivery mode:** `conditional_destination`

**Privacy classification:** `customer_personal_data`

Emitted only when a deterministic conditional automation rule is selected.

- [Data JSON Schema](/developers/v14/schemas/webhooks/com.elicitra.automation.triggered.v1.schema.json)

### Example CloudEvent

```json
{
  "data": {
    "activation": {
      "executionId": "activation_01",
      "matchedConditions": [
        {
          "actual": 4,
          "expected": 4,
          "field": "intent",
          "operator": "gte",
          "source": "score"
        }
      ],
      "ruleId": "qualified_lead",
      "ruleLabel": "Qualified lead"
    },
    "analysis": {
      "analysisAnswers": [
        {
          "answer": "A new website",
          "questionKey": "main_need"
        }
      ],
      "classifications": [
        {
          "axisKey": "urgency",
          "value": "medium"
        }
      ],
      "configuredAnswers": [
        {
          "fieldKey": "goal",
          "status": "answered",
          "value": "New website"
        }
      ],
      "insights": [
        "The requested scope is concrete."
      ],
      "missingFields": [],
      "openQuestions": [
        "Who approves the project?"
      ],
      "operatorHandoff": "Confirm the preferred timing.",
      "recommendedActions": [
        "Confirm timing and stakeholders."
      ],
      "riskNotes": [],
      "salesHandoff": "Follow up through the authorized channel.",
      "scores": {
        "completeness": 5,
        "intent": 4
      },
      "summary": "Ada requested a follow-up about the website project."
    },
    "campaign": {
      "id": "campaign_01",
      "name": "Website qualification"
    },
    "consents": [
      {
        "granted": true,
        "scopeKey": "structured_extraction_and_lead_handoff"
      }
    ],
    "interaction": {
      "channel": "phone",
      "endedAt": "2026-07-31T12:00:00.000Z",
      "id": "call_01",
      "outcome": "completed",
      "reasonCode": "respondent_ended"
    },
    "organization": {
      "id": "org_01"
    },
    "respondent": {
      "email": "ada@example.com",
      "name": "Ada",
      "phone": "+390212345678"
    },
    "scenario": {
      "id": "scenario_01",
      "name": "Website qualification",
      "revision": 4,
      "slug": "website_qualification"
    },
    "truncation": {
      "omittedFields": [],
      "truncated": false
    }
  },
  "datacontenttype": "application/json",
  "dataschema": "https://elicitra.eigen.rest/developers/v6/schemas/webhooks/com.elicitra.automation.triggered.v1.schema.json",
  "id": "018f769b-7a6a-7c32-9f3c-8399b27c33f4",
  "source": "https://elicitra.eigen.rest",
  "specversion": "1.0",
  "subject": "interactions/call_01",
  "time": "2026-07-31T12:00:00.000Z",
  "type": "com.elicitra.automation.triggered.v1"
}
```
