# Webhook Updates

## 🔄 Important Changes Starting July 1, 2025

We're simplifying our webhook payload structure to make integration cleaner and more straightforward.

### What's Changing?

Starting **July 1, 2025**, all new webhooks will deliver a streamlined payload structure by removing the wrapper `data` key.

#### Before (Old Format)

```json
{
  "data": {
    "id": "file_XXX-XXX-XXX-XXX-XXX",
    "filename": "SQUAKE-CompensationCertificate-euc1XXX.pdf",
    "purpose": "confirmation_document",
    "size": 100,
    "type": "pdf",
    "download_url": "https://squake.s3.eu-central-1.amazonaws.com/...."
  }
}
```

#### After (New Format)

```json
{
  "id": "file_XXX-XXX-XXX-XXX-XXX",
  "filename": "SQUAKE-CompensationCertificate-euc1XXX.pdf",
  "purpose": "confirmation_document",
  "size": 100,
  "type": "pdf",
  "download_url": "https://squake.s3.eu-central-1.amazonaws.com/...."
}
```

### 🔐 Security Enhancement

Along with the structural change, we're updating our security implementation:

* **Previously**: Signature hash was calculated based only on the content inside the `data` key
* **Now**: Signature hash is calculated based on the entire webhook body

This provides more comprehensive payload integrity verification.

### 📅 Timeline & Compatibility

* **Effective Date**: July 1, 2025
* **Backward Compatibility**: ✅ Existing webhooks created before July 1, 2025 will continue to work with the current format
* **Action Required**: No immediate action needed for existing integrations

### 💡 Benefits

* **Cleaner Structure**: Direct access to webhook payload without unnecessary nesting
* **Improved Security**: Enhanced signature validation covering the entire payload
* **Simplified Integration**: Easier to parse and work with webhook data

### 📋 Migration Checklist

If you're planning to create new webhooks after July 1, 2025:

* [ ] Update your webhook handler to expect the new flat structure
* [ ] Adjust your signature verification logic to validate the entire body
* [ ] Test your integration with the new format before going live

### 🤝 Need Help?

If you have any questions about these changes or need assistance with migration, please don't hesitate to reach out to our support team.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-integration.squake.earth/notable-changes/webhook-updates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
