GET /metrics/latency
Returns time series of P50/P95/P99 latency per destination (always hourly). Real-time (<=48h) computes percentiles from raw delivery_attempts; historical (>48h) uses pre-computed percentiles.

Authentication

API Key (header: X-API-Key) API Key (cookie: better-auth.session_token)

Query Parameters

destination_id string optional query
after string optional query
before string optional query

Responses

200 Latency percentiles time series
application/json
series object[] REQUIRED
Array of:
401 Unauthorized
curl -X GET 'https://hookstream.io/v1/metrics/latency' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://hookstream.io/v1/metrics/latency', {
  method: 'GET',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN"
  }
});

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

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.get('https://hookstream.io/v1/metrics/latency', headers=headers)
print(response.json())
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://hookstream.io/v1/metrics/latency", nil)
	req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")

	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
	result, _ := io.ReadAll(resp.Body)
	fmt.Println(string(result))
}
200 Response
{
  "series": [
    "<object>"
  ]
}
GET /metrics/latency
Ask a question... ⌘I