> For the complete documentation index, see [llms.txt](https://docs.lhv.com/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lhv.com/home/connect/services/messages/mark-batch-of-messages-as-processed.md).

# Mark batch of messages as processed

## Service description

Confirm successful reading and processing of several messages by deleting these from your pending list. Use the service in combination with [Get list of messages](/home/connect/services/messages/get-list-of-messages.md)

## Request <a href="#virtual-iban-open" id="virtual-iban-open"></a>

<mark style="color:orange;">`POST`</mark> <https://connect.lhv.com/messages/delete>

#### **Headers**

<table><thead><tr><th width="165">Name</th><th width="181">Value</th><th>Description</th></tr></thead><tbody><tr><td>Client-Code</td><td><code>customer value</code></td><td>For Service Providers only. Company registration code of the Service Provider or its customer. When using the Service Provider own value also related customers messages are returned by default - see also Filter-Service-Provider for more options.</td></tr><tr><td>Client-Country</td><td><code>customer value</code></td><td>For Service Providers only. Should match the value of Client-Code</td></tr></tbody></table>

#### **Body**

JSon array

{% tabs %}
{% tab title="List of messages" %}
{% hint style="info" %}
List of message Id's
{% endhint %}

```json
{
	"messageResponseIds": [
		"RES6bd75393a14f4c1fbcb4f3f5327c092f",
		"RES0021745785e24135ada8a40488782480",
		"RES2ea2b8f6ac464bf5b041a7b69805e878"
	]
}
```

{% endtab %}
{% endtabs %}

### **Response**

**Headers**

<table><thead><tr><th width="241">Name</th><th width="186">Value</th><th>Description</th></tr></thead><tbody><tr><td>X-Bank-Code</td><td><code>LHVUK</code>, <code>LHVEE</code></td><td>LHV Bank entity</td></tr></tbody></table>

#### Body

{% tabs %}
{% tab title="200 - deleted" %}
{% hint style="success" %}
OK

All messages deleted successfully
{% endhint %}

```json
{
    "messages": [
        {
            "messageResponseId": "RES0021745785e24135ada8a40488782480",
            "status": 200
        },
        {
            "messageResponseId": "RES6bd75393a14f4c1fbcb4f3f5327c092f",
            "status": 200
        },
        {
            "messageResponseId": "RES2ea2b8f6ac464bf5b041a7b69805e878",
            "status": 200
        }
    ]
}
```

{% endtab %}

{% tab title="207 - partially deleted" %}
{% hint style="info" %}
Multi-Status

Not all messages deleted
{% endhint %}

```json
{
    "messages": [
        {
            "messageResponseId": "RES0021745785e24135ada8a40488782480",
            "status": 200
        },
        {
            "messageResponseId": "RES6bd75393a14f4c1fbcb4f3f5327c092f",
            "status": 200
        },
        {
            "messageResponseId": "RES2ea2b8f6ac464bf5b041a7b69805e878",
            "status": 400
        }
    ]
}
```

{% endtab %}

{% tab title="400 - not deleted" %}
{% hint style="danger" %}
Bad request

No messages deleted
{% endhint %}

```json
{
    "messages": [
        {
            "messageResponseId": "RES0021745785e24135ada8a40488782480",
            "status": 400
        },
        {
            "messageResponseId": "RES6bd75393a14f4c1fbcb4f3f5327c092f",
            "status": 400
        },
        {
            "messageResponseId": "RES2ea2b8f6ac464bf5b041a7b69805e878",
            "status": 400
        }
    ]
}
```

{% endtab %}

{% tab title="403 - error" %}
{% hint style="danger" %}
Error code and description
{% endhint %}

<pre><code>&#x3C;Errors>
<strong>    &#x3C;Error>
</strong>        &#x3C;ErrorCode>FORBIDDEN&#x3C;/ErrorCode>
        &#x3C;Description>User doesn't exist&#x3C;/Description>
    &#x3C;/Error>
&#x3C;/Errors>
</code></pre>

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.lhv.com/home/connect/services/messages/mark-batch-of-messages-as-processed.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
