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

# Project metrics

Aggregated event + webhook delivery counts for a 24h or 7d window.

` GET /api/projects/{id}/metrics `

Aggregated event + webhook delivery metrics

## Servers

- ` https://motioness.com ` — Production

## Authentication

The operation accepts these alternatives. Schemes within one alternative are required together.

### Alternative 1

- ` sessionCookie `: ` apiKey `

  - Credential: ` better-auth.session_token ` in ` cookie `

  - Session cookie set by /api/user/signin, /api/user/signup, or the OAuth callback. Required for all authenticated endpoints.

## Parameters

### ` id ` (path, required)

- ` value `: type ` string `

  - example: ` "abc123" `

  - minLength: ` 1 `

Example:

```json
"abc123"
```

### ` range ` (query, optional)

- ` value `: type ` string `

  - enum: ` ["24h","7d"] `

  - default: ` "24h" `

## Responses

### ` 200 ` — Metrics window

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` range `, ` events `, ` webhooks `

  - ` range `: type ` string `

  - ` events `: type ` object `

    - Required fields: ` total `, ` ready_count `, ` failed_count `

    - ` total `: type ` number `

    - ` ready_count `: type ` number `

    - ` failed_count `: type ` number `

  - ` webhooks `: type ` object `

    - Required fields: ` total `, ` delivered `, ` dead `

    - ` total `: type ` number `

    - ` delivered `: type ` number `

    - ` dead `: type ` number `

### ` 404 ` — Not found

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` error `

  - ` error `: type ` string `

## Request examples

### cURL

```curl
curl -X GET 'https://motioness.com/api/projects/abc123/metrics'
```

### JavaScript

```javascript
const response = await fetch('https://motioness.com/api/projects/abc123/metrics', {
  method: 'GET'
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

response = requests.get('https://motioness.com/api/projects/abc123/metrics')
print(response.json())
```