Skip to main content
The API Metrics endpoint returns a record of every API request made under your merchant account. Each entry captures the endpoint called, the HTTP method, the response status code, and how long the request took. This data is useful for monitoring integration health, identifying slow endpoints, and auditing usage patterns over time.
This endpoint requires the analytics:read permission on your API key.

Request

GET https://0k90mc4jjj.execute-api.us-east-2.amazonaws.com/v1/analytics/api-metrics

Headers

Authorization
string
required
Bearer token using your API key. Format: Bearer cs_live_your_key

Query parameters

limit
integer
default:"50"
Number of metric records to return per page. Maximum 100.
lastEvaluatedKey
string
Pagination cursor returned by the previous response. Pass this value to retrieve the next page of results.

Response

200 — success

metrics
array
List of API request metric records.
count
integer
Number of metric records returned in this page.
hasMore
boolean
true if additional pages of results are available.
lastEvaluatedKey
string
Pagination cursor to pass as lastEvaluatedKey in your next request. null when you have reached the last page.

401 — unauthorized

Returned when your API key is missing, invalid, or lacks the analytics:read permission.

Example

curl "https://0k90mc4jjj.execute-api.us-east-2.amazonaws.com/v1/analytics/api-metrics?limit=10" \
  -H "Authorization: Bearer cs_live_your_key"
Sample response (200)
{
  "metrics": [
    {
      "metricId": "met_07np9qf4tvyi3za8guvj1bkm2e",
      "endpoint": "/v1/payments",
      "method": "GET",
      "statusCode": 200,
      "responseTime": 87,
      "timestamp": 1714090200
    },
    {
      "metricId": "met_08oq0rg5uwzj4ab9hvwk2cln3f",
      "endpoint": "/v1/webhooks",
      "method": "POST",
      "statusCode": 201,
      "responseTime": 134,
      "timestamp": 1714090150
    },
    {
      "metricId": "met_09pr1sh6vxak5bc0iwxl3dmo4g",
      "endpoint": "/v1/subscriptions/sub_abc123",
      "method": "PUT",
      "statusCode": 404,
      "responseTime": 42,
      "timestamp": 1714090100
    }
  ],
  "count": 3,
  "hasMore": true,
  "lastEvaluatedKey": "eyJtZXRyaWNJZCI6Im1ldF8wOXByMXNoNnZ4YWs1YmMwaXd4bDNkbW80ZyJ9"
}
Use lastEvaluatedKey from each response as the lastEvaluatedKey query parameter in your next request to paginate through all metric records. See the pagination guide for a full walkthrough.