# Webhook Event Types

Extracta LABS webhooks send an `event` field in the payload to indicate what type of action occurred in the system. The event name is a **namespaced string**, with the format:

```
<feature>.<action>
```

This makes the system **modular and scalable**, allowing multiple features (e.g., data extraction, document classification, etc.) to have their own distinct set of events without overlap.

***

## 🔍 Current Feature: `extraction`

All current webhook events are prefixed with `extraction.` because they relate to **data extraction**, which is the first core feature of Extracta LABS.

***

## ✅ Available `extraction` Events

### **`extraction.processed`**

**Description:**\
Triggered when one or more files are successfully processed and data has been extracted. If you process multiple files in a single upload, this webhook will be triggered when all the files are processed.

**Why it's useful:**\
Initiate follow-up actions like storing results, analyzing data, or notifying stakeholders.

***

### **`extraction.edited`**

**Description:**\
Fired when a user manually edits the extracted data in the Extracta LABS interface.

**Why it's useful:**\
Track user input, sync updates to downstream systems, or trigger quality checks.

***

### **`extraction.confirmed`**

**Description:**\
Occurs when a user manually confirms the extracted data, indicating final approval.

**Why it's useful:**\
Use this as a signal to finalize workflows, store results permanently, or notify teams.

***

### **`extraction.failed`**

**Description:**\
Sent when a file fails to process (e.g. due to corruption, unsupported format, or internal errors).

**Why it's useful:**\
Alert your team, retry processing, or prompt the user to upload a new version.

***

## 🧠 Future-Proofing: Other Feature Namespaces

As Extracta LABS grows, additional webhook namespaces will be introduced. For example:

**`classification.*` (future)**

***

By using namespaced events like `extraction.processed`, your application can easily distinguish between different types of events and scale accordingly as new features are added.
