# Endpoint Stats

> Webhooks API, GET /endpoint/{endpoint_id}/stats: Get basic statistics for the endpoint, since max 28 days.

`GET /endpoint/{endpoint_id}/stats` on the Webhooks API. Base URL: `https://api.sinay.ai/webhook/api/v1`.

Get basic statistics for the endpoint, since max 28 days. Will return amount of messages sent with success, failed or still in progress.

## Path parameters

::api-parameters{location="path"}
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `endpoint_id` | string | Yes | The ep's ID or UID. Example: `unique-ep-identifier`. |
::

## Query parameters

::api-parameters{location="query"}
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `since` | string (date-time), nullable | No | Filter the range to data starting from this date. Example: `2024-06-12T12:00:00Z`. |
| `until` | string (date-time), nullable | No | Filter the range to data ending by this date. Example: `2024-06-12T12:00:00Z`. |
::

## Responses

::api-response
---
status: "200"
description: ""
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | integer (int64) | Yes | Number of successful messages sent to this endpoints in the time period. |
| `pending` | integer (int64) | Yes | Number of messages sent to this endpoints in the time period, that are still pending. |
| `sending` | integer (int64) | Yes | Number of messages sent to this endpoints in the time period, that are still in sending state (messages can be retried several times). |
| `fail` | integer (int64) | Yes | Number of failed messages sent to this endpoints in the time period (messages have been retried several time before being failed). |

::

::api-response
---
status: "400"
description: Bad request
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | Yes | — |
| `detail` | string | Yes | — |

::

::api-response
---
status: "403"
description: Forbidden
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | Yes | — |
| `detail` | string | Yes | — |

::

::api-response
---
status: "404"
description: Not Found. Endpoint not found.
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | Yes | — |
| `detail` | string | Yes | — |

::

::api-response
---
status: "429"
description: Too Many Requests
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | Yes | — |
| `detail` | string | Yes | — |

::

::api-response
---
status: "500"
description: Internal Error
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | Yes | — |
| `detail` | string | Yes | — |

::
