# Get Message Summary

Retrieve a list of messages within a specific date range. Supports filtering by from/to dates.

### <mark style="color:green;">`GET`</mark> `/messages/summary`&#x20;

#### Required Permission

```
read:Dashboard
```

Your API key must have this permission enabled in order to use this endpoint.

#### Example Request

```bash
curl --location 'https://<hostname>/messages/summary?fromDate=2025-01-01&toDate=2025-03-01' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY'
```

Replace `YOUR_API_KEY` with your API key.

{% hint style="info" %}
All endpoints shown in this documentation use a **sample base URL**. The production API endpoint is provided by our team upon request.
{% endhint %}

### Query Parameters

| Parameter | Type                | Required | Description                       |
| --------- | ------------------- | -------- | --------------------------------- |
| fromDate  | string (YYYY-MM-DD) | Yes      | Start date for the summary range. |
| toDate    | string (YYYY-MM-DD) | Yes      | End date for the summary range.   |

### Response (HTTP 200)

```json
{
  "success": true,
  "summary": {
    "totalSent": 1000,
    "totalDelivered": 980,
    "totalFailed": 20,
    "totalOptedOut": 5,
    "totalPending": 10
  }
}
```

#### Response Fields

| Field          | Type   | Description                             |
| -------------- | ------ | --------------------------------------- |
| totalSent      | number | Total messages submitted in the period. |
| totalDelivered | number | Total messages successfully delivered.  |
| totalFailed    | number | Total messages that failed to deliver.  |
| totalOptedOut  | number | Total messages blocked due to opt-outs. |
| totalPending   | number | Messages still awaiting delivery.       |

{% hint style="info" %}
Date filters (`fromDate` and `toDate`) must be in `YYYY-MM-DD` format.
{% endhint %}

{% hint style="success" %}
This endpoint supports sorting and pagination. See [Search & Pagination Parameters](https://wiki.mobivatebulksms.com/search-and-pagination-parameters/introduction-to-searching-and-pagination) for details.
{% endhint %}
