GET /billing/usage
Returns current usage vs plan limits for events, sources, and destinations.

Authentication

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

Responses

200 Current usage and limits
application/json
plan string REQUIRED
Current plan name
events object REQUIRED
used number REQUIRED
Events used this billing period
limit number REQUIRED
Event limit for the plan
percentage number REQUIRED
Usage percentage (0-100)
sources object REQUIRED
used number REQUIRED
limit number REQUIRED
destinations object REQUIRED
used number REQUIRED
limit number REQUIRED
retention_days number REQUIRED
Data retention in days
401 Unauthorized
curl -X GET 'https://hookstream.io/v1/billing/usage' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://hookstream.io/v1/billing/usage', {
  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/billing/usage', headers=headers)
print(response.json())
package main

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

func main() {
	req, _ := http.NewRequest("GET", "https://hookstream.io/v1/billing/usage", 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
{
  "plan": "free",
  "events": {
    "used": 123,
    "limit": 123,
    "percentage": 123
  },
  "sources": {
    "used": 123,
    "limit": 123
  },
  "destinations": {
    "used": 123,
    "limit": 123
  },
  "retention_days": 123
}
GET /billing/usage
Ask a question... ⌘I