GET
/
stats
Get usage statistics
curl --request GET \
  --url https://api.callmelater.xyz/stats \
  --header 'x-api-key: <api-key>'
{
  "totalInvocations": 150,
  "successfulInvocations": 135,
  "failedInvocations": 15,
  "averageResponseTime": 245.5,
  "timeRange": {
    "from": "2024-11-01T00:00:00Z",
    "to": "2024-12-01T00:00:00Z"
  }
}
Retrieve comprehensive usage statistics including total requests, success rates, and credit consumption.

Example Request

curl -X GET https://api.callmelater.xyz/stats \
  -H "x-api-key: YOUR_API_KEY"

Response

{
  "totalRequests": 2000,
  "successfulRequests": 1850,
  "failedRequests": 100,
  "pendingRequests": 50,
  "successRate": 92.5,
  "creditsUsed": 2000,
  "creditsRemaining": 1500
}

Statistics Overview

  • totalRequests: Total number of requests scheduled
  • successfulRequests: Number of successfully executed requests
  • failedRequests: Number of failed requests
  • pendingRequests: Number of pending/scheduled requests
  • successRate: Success rate as a percentage (0-100)
  • creditsUsed: Total credits consumed
  • creditsRemaining: Credits currently available

Use Cases

  • Performance Monitoring: Track success rates and identify trends
  • Reporting: Generate usage reports for stakeholders
  • Optimization: Identify patterns to improve reliability
  • Planning: Forecast credit needs based on historical usage

Authorizations

x-api-key
string
header
required

API key authentication. Include your API key in the x-api-key header.

Query Parameters

from
string

Start date for statistics (ISO 8601 format)

Example:

"2024-11-01T00:00:00Z"

to
string

End date for statistics (ISO 8601 format)

Example:

"2024-12-01T00:00:00Z"

Response

200
application/json

Usage statistics

The response is of type object.