> ## Documentation Index
> Fetch the complete documentation index at: https://convo.co.in/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve Daily Campaign Analytics for a Date Range

> Retrieve day-by-day campaign analytics over a date range, with sent, delivered, read, failed, and reply message counts for each day.

Use this endpoint to retrieve daily analytics for a specific campaign. The response breaks down message delivery metrics (sent, delivered, read, failed) by day across the requested date range.

## Endpoint

```text theme={null}
POST https://connect.api-wa.co/project-apis/v1/project/{project_id}/campaign/analytics/{campaign_id}
```

## Authentication

```text theme={null}
X-API-WA-Project-API-Pwd: YOUR_API_PASSWORD
```

## Path Parameters

**project\_id** `string` *required*

Your Convo project ID.

**campaign\_id** `string` *required*

The unique ID of the campaign whose analytics you want to retrieve.

## Request Body

**startDate** `string` *required*

ISO 8601 date-time string for the start of the analytics range. Example: `"2024-01-01T00:00:00Z"`.

**endDate** `string` *required*

ISO 8601 date-time string for the end of the analytics range. Example: `"2024-01-07T23:59:59Z"`.

## Request Example

```bash theme={null}
curl -X POST \
  "https://connect.api-wa.co/project-apis/v1/project/YOUR_PROJECT_ID/campaign/analytics/64b3e1ac7f2c0a001d8e9f34" \
  -H "X-API-WA-Project-API-Pwd: YOUR_API_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{
    "startDate": "2024-01-01T00:00:00Z",
    "endDate": "2024-01-07T23:59:59Z"
  }'
```

## Response

Returns a `chats` array where each element represents one day's analytics for the campaign.

**chats** `array`

Array of daily analytics objects. Each object contains the following fields:

**Analytics Object**

**dayDate** `string`

The date this analytics entry corresponds to, in ISO 8601 format.

**sentChatCount** `integer`

Total number of messages sent on this day.

**deliveredChatcount** `integer`

Total number of messages successfully delivered on this day.

**readChatCount** `integer`

Total number of messages read by recipients on this day.

**failedChatCount** `integer`

Total number of messages that failed to send on this day.

**repliedToCampaignCount** `integer`

Number of contacts who replied to the campaign on this day.

**engagementCount** `integer`

Total number of engagements (reads + replies + clicks) recorded on this day.

**campaignMessages.total** `integer`

Total campaign messages dispatched on this day.

**templateMessagesCount** `integer`

Number of template messages sent on this day.

## Example Response

```json theme={null}
{
  "chats": [
    {
      "dayDate": "2024-01-01T00:00:00.000Z",
      "sentChatCount": 1520,
      "deliveredChatcount": 1490,
      "readChatCount": 1102,
      "failedChatCount": 30,
      "repliedToCampaignCount": 87,
      "engagementCount": 1189,
      "campaignMessages": {
        "total": 1520
      },
      "templateMessagesCount": 1520
    },
    {
      "dayDate": "2024-01-02T00:00:00.000Z",
      "sentChatCount": 320,
      "deliveredChatcount": 315,
      "readChatCount": 210,
      "failedChatCount": 5,
      "repliedToCampaignCount": 22,
      "engagementCount": 232,
      "campaignMessages": {
        "total": 320
      },
      "templateMessagesCount": 320
    }
  ]
}
```

## Error Responses

| Status Code | Description |
| - | - |
| `400` | Bad Request — The `startDate` or `endDate` value is missing or not a valid ISO date string. |
| `500` | Internal Server Error — An unexpected server-side error occurred. Retry the request or contact support. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.