# Event list

**Endpoint**

`GET/v2/messages/events`

**Link**

{% embed url="<https://stagep.tst-apidmndelss.com/openapi/v2.html#/operations/Messages_GetEvents>" %}

### **Request**

#### **Query Parameters**

| Parameter           | Type      | Description                  | Required | Example |
| ------------------- | --------- | ---------------------------- | -------- | ------- |
| **`meta.page`**     | `integer` | Page number (starts from 0). | No       | `0`     |
| **`meta.pageSize`** | `integer` | Number of items per page.    | No       | `20`    |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `Bearer <JWT>`     | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns a paginated list of events with their available variables.

#### **Response Fields**

**1. Meta Object**

| Field          | Type      | Description             | Example |
| -------------- | --------- | ----------------------- | ------- |
| **`pageSize`** | `integer` | Items per page.         | `20`    |
| **`page`**     | `integer` | Current page number.    | `0`     |
| **`total`**    | `string`  | Total events available. | `"45"`  |

**2. Event Object (`items[]`)**

| Field           | Type      | Description                                  | Example              |
| --------------- | --------- | -------------------------------------------- | -------------------- |
| **`id`**        | `integer` | **Unique event identifier**.                 | `101`                |
| **`Name`**      | `string`  | **Event name** (descriptive).                | `"customer.created"` |
| **`variables`** | `array`   | **Available data variables** for this event. | -                    |

**Variable Object**

| Field      | Type     | Description                                   | Example        |
| ---------- | -------- | --------------------------------------------- | -------------- |
| **`name`** | `string` | **Variable name** available in event payload. | `"customerId"` |

**Example Response:**

json

```
{
  "items": [
    {
      "id": 101,
      "Name": "customer.created",
      "variables": [
        {"name": "customerId"},
        {"name": "customerName"},
        {"name": "email"},
        {"name": "createdAt"}
      ]
    },
    {
      "id": 102,
      "Name": "payment.processed",
      "variables": [
        {"name": "paymentId"},
        {"name": "amount"},
        {"name": "currency"},
        {"name": "status"}
      ]
    },
    {
      "id": 103,
      "Name": "account.updated",
      "variables": [
        {"name": "accountId"},
        {"name": "balance"},
        {"name": "previousBalance"},
        {"name": "updatedAt"}
      ]
    }
  ],
  "meta": {
    "pageSize": 20,
    "page": 0,
    "total": "45"
  }
}
```

***

### **Examples**

#### **Request**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/messages/events?meta.page=0&meta.pageSize=10' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

#### **Request with Pagination**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/messages/events?meta.page=1&meta.pageSize=5' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

***

### **Common Event Types**

* **Customer Events**: `customer.created`, `customer.updated`, `customer.verified`
* **Payment Events**: `payment.initiated`, `payment.completed`, `payment.failed`
* **Account Events**: `account.created`, `account.balance.updated`
* **System Events**: `system.maintenance`, `system.update`

***

### **Error Responses**

1. **Unauthorized**:

   json

   ```
   { "error": "Unauthorized" }
   ```
2. **Invalid Page**:

   json

   ```
   { "error": "Page number must be non-negative" }
   ```

***

### **Notes**

* **Usage**: These events can be used for webhooks, email templates, or system notifications.
* **Variable Access**: In templates, use `{{variableName}}` syntax to access these variables.
* **Pagination**: Default `pageSize` is typically 20-50 items.
* **Real-time**: This list may change as new features are added to the system.

Real request example

```postman_json
Authorization:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxMTM3MjE5LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.xqnAr-ffZA9R5kXPxzJN00AEwMpWv9TZjezYn8ZoWkw

```

Real response example

200 OK

```postman_json
{
  "items": [
    {
      "id": 5,
      "Name": "password_recovery",
      "variables": []
    },
    {
      "id": 7,
      "Name": "email_confirm",
      "variables": []
    },
    {
      "id": 8,
      "Name": "deposit_create",
      "variables": []
    },
    {
      "id": 9,
      "Name": "withdrawal_create",
      "variables": []
    },
    {
      "id": 10,
      "Name": "transfer_create",
      "variables": []
    },
    {
      "id": 11,
      "Name": "exchange_create",
      "variables": []
    },
    {
      "id": 12,
      "Name": "deposit_update",
      "variables": []
    },
    {
      "id": 13,
      "Name": "withdrawal_update",
      "variables": []
    },
    {
      "id": 14,
      "Name": "transfer_update",
      "variables": []
    },
    {
      "id": 15,
      "Name": "exchange_update",
      "variables": []
    },
    {
      "id": 16,
      "Name": "application_crete",
      "variables": []
    },
    {
      "id": 17,
      "Name": "application_update",
      "variables": []
    },
    {
      "id": 18,
      "Name": "counterparty_create",
      "variables": []
    },
    {
      "id": 19,
      "Name": "counterparty_account_create",
      "variables": []
    },
    {
      "id": 20,
      "Name": "counterparty_account_update",
      "variables": []
    },
    {
      "id": 21,
      "Name": "mfa_email_code",
      "variables": []
    },
    {
      "id": 22,
      "Name": "mfa_sms_code",
      "variables": []
    },
    {
      "id": 23,
      "Name": "system",
      "variables": []
    }
  ],
  "meta": {
    "pageSize": 0,
    "page": 0,
    "total": "18"
  }
}
```


---

# 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/messages/event-list.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.
