# Hook Structure

Delos webhooks contain a typed structure consisting of main fields and objects depending on the type of webhook

**Example**

```json
{
  //Unique Event ID (uuid4)
  "hook_id" : "string",
  //Webhook Type
  "hook_type" : int,
  "Data" : {
    // Object by webhook type
    // "Operation" : {}
    // or
    // "Client" : {}
    // or
    // "Account" : {}
    // or
    // "Counterparty" : {}
  }
}
```

### Webhook Types

Field `hook_type` is string value:

* 1 = OPERATION - Webhook contains Operation object
* 2 = DEPOSIT\_ACCOUNT - Webhook contains Deposit Account object
* 3 = CLIENT - Webhook contains customer object
* 4 = COUNTERPARTY - Webhook contains Counterparty (Beneficiar) object
* 5 = DEPOSIT\_ACCOUNT\_REQUISITE - Webhook contains Deposit Account object (Raised if requisites is changed)

Webhooks are sent whenever the status or state of the corresponding object changes.

#### Example webhook body (Operation):

```json
{
  "hook_id": "f1c37cdc-1c64-466c-bd3f-306c000e6b36",
  "hook_type": 1,
  "Data": {
    "Operation": {
      "cuid": "DnuQu6n-dP25-YKJ78eiuzL",
      "opid": "977d614e-6ca8-492e-97b5-9e7f0f73d86c",
      "type": 3,
      "source": {
        "account": "U1v72kDJdQw"
      },
      "status": 1,
      "created_at": {
        "seconds": 1734589267
      },
      "is_visible": true,
      "updated_at": {
        "nanos": 221000000,
        "seconds": 1734589267
      },
      "destination": {
        "beneficiar": "U6OFFpEoEdHA"
      },
      "payment_type": 3,
      "source_amount": {
        "sum": {
          "nanos": 200000000,
          "units": 123,
          "currency_code": "USD"
        },
        "default": {
          "nanos": 200000000,
          "units": 123,
          "currency_code": "USD"
        }
      },
      "commission_amount": {
        "sum": {
          "currency_code": "USD"
        },
        "default": {
          "currency_code": "USD"
        }
      },
      "destination_amount": {
        "sum": {
          "nanos": 200000000,
          "units": 123,
          "currency_code": "USD"
        },
        "default": {
          "nanos": 200000000,
          "units": 123,
          "currency_code": "USD"
        }
      },
      "current_balance_amount": {
        "sum": {
          "units": 295,
          "currency_code": "USD"
        },
        "default": {
          "units": 295,
          "currency_code": "USD"
        }
      }
    }
  }
}
```


---

# 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.delos.financial/webhooks/hook-structure.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.
