---
updatedAt: 2025-02-19T23:45:03.000Z
agentTools:
  projectIndex: https://documentation.safecube.ai/llms.txt
---

# Endpoint Stats

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

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Webhook api",
    "version": "1.2.1",
    "description": "Welcome to the documentation of Webhook API\n<h1>Compatibility guidelines</h1> <p>The HTTP API is versioned with a single number, which is currently 1</p> <p>This number symbolizes the major version number. New features can be added to the API in the same version number if there is no breaking change.</p> <p>The version number is present in the url, for instance <strong>/webhook/api/v1</strong> for the current version. <p>Please notice that all \"/shipment\" endpoints are deprecated. Therefore it is recommended to use the \"/easy-shipment\" endpoints.</p>\n<h1>Documentation, Pricing and Key generation</h1> <p>You can find the complete documentation for our API at <a href='https://developers.sinay.ai/'>Developers Platform</a>.</p> <p>Create an account to receive your FREE key in under a minute!</p> <p>Additionally, explore our pricing plans, access support, view detailed documentation, and follow our comprehensive tutorials.</p>\n<h1>Authentication</h1> <p>Every endpoints of this API require authentication using an API key.</p> <p>If you don't have an API Key and you need to use the Ports and Vessels  API, you need to ask Sinay to have one.</p> <p>To use the API Key, you must add a header named <strong>API_KEY</strong> with your API Key as a value.</p> <h1>Test the API with Swagger-ui</h1> <p>To test the API using Swagger-ui, you must click on the button <strong>Authorize</strong> and then fill the <strong>apiKey</strong> field and click on <strong>Authorize</strong>.</p> <p>Swagger-ui will then use the api key automatically in each request.</p> <p>On every endpoints, you can click on <strong>Try it out</strong>, you can modify the body and then click on <strong>Execute</strong></p> <p>You will be able to see the response.</p>\n<h1>Release note</h1> <h2>1.2.0</h2> <ul> <li>POST /easy-shipment-asynchronous</li> </ul> <h2>1.1.0</h2> <ul> <li>Easy-shipment endpoints</li> </ul> <h2>1.0.0</h2> <ul> <li>Manage webhook</li> </ul>"
  },
  "servers": [
    {
      "url": "https://api.sinay.ai/webhook/api/v1"
    }
  ],
  "security": [
    {
      "ApiKey": []
    }
  ],
  "tags": [
    {
      "name": "Endpoint",
      "description": "Endpoints are the URLs messages will be sent to. Endpoints must be configured with filters to setup which events you wish to track with them."
    }
  ],
  "paths": {
    "/endpoint/{endpoint_id}/stats": {
      "get": {
        "tags": [
          "Endpoint"
        ],
        "summary": "Endpoint Stats",
        "description": "Get basic statistics for the endpoint, since max 28 days. Will return amount of messages sent with success, failed or still in progress.",
        "operationId": "v1.endpoint.get-stats",
        "parameters": [
          {
            "in": "path",
            "name": "endpoint_id",
            "description": "The ep's ID or UID",
            "required": true,
            "schema": {
              "description": "The ep's ID or UID To retrieve your endpoints ids, use GET /endpoint.",
              "type": "string",
              "maxLength": 256,
              "minLength": 1,
              "pattern": "^[a-zA-Z0-9\\-_.]+$",
              "example": "unique-ep-identifier"
            },
            "style": "simple"
          },
          {
            "in": "query",
            "name": "since",
            "description": "Filter the range to data starting from this date",
            "schema": {
              "description": "Filter the range to data starting from this date",
              "type": "string",
              "format": "date-time",
              "nullable": true,
              "example": "2024-06-12T12:00:00Z"
            },
            "style": "form"
          },
          {
            "in": "query",
            "name": "until",
            "description": "Filter the range to data ending by this date",
            "schema": {
              "description": "Filter the range to data ending by this date",
              "type": "string",
              "format": "date-time",
              "nullable": true,
              "example": "2024-06-12T12:00:00Z"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndpointStats"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpErrorOut"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpErrorOut"
                }
              }
            }
          },
          "404": {
            "description": "Not Found. Endpoint not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpErrorOut"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpErrorOut"
                }
              }
            }
          },
          "500": {
            "description": "Internal Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpErrorOut"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "HttpErrorOut": {
        "title": "HttpError",
        "type": "object",
        "required": [
          "code",
          "detail"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          }
        }
      },
      "EndpointStats": {
        "type": "object",
        "required": [
          "fail",
          "pending",
          "sending",
          "success"
        ],
        "properties": {
          "success": {
            "description": "Number of successful messages sent to this endpoints in the time period.",
            "type": "integer",
            "format": "int64"
          },
          "pending": {
            "description": "Number of messages sent to this endpoints in the time period, that are still pending.",
            "type": "integer",
            "format": "int64"
          },
          "sending": {
            "description": "Number of messages sent to this endpoints in the time period, that are still in sending state (messages can be retried several times).",
            "type": "integer",
            "format": "int64"
          },
          "fail": {
            "description": "Number of failed messages sent to this endpoints in the time period (messages have been retried several time before being failed).",
            "type": "integer",
            "format": "int64"
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "API_KEY"
      }
    }
  }
}
```