Get the org's metering usage for the current billing period
curl --request GET \
--url https://api.webhook.co/v1/usage \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.webhook.co/v1/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.webhook.co/v1/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.webhook.co/v1/usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"capKind": "lifetime",
"events": 4503599627370495,
"eventCap": 4503599627370495,
"pausePolicy": "pause",
"paused": true
}{
"error": "<string>",
"message": "<string>"
}<string>Usage
Get the org's metering usage for the current billing period
GET
/
v1
/
usage
Get the org's metering usage for the current billing period
curl --request GET \
--url https://api.webhook.co/v1/usage \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.webhook.co/v1/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.webhook.co/v1/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.webhook.co/v1/usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"capKind": "lifetime",
"events": 4503599627370495,
"eventCap": 4503599627370495,
"pausePolicy": "pause",
"paused": true
}{
"error": "<string>",
"message": "<string>"
}<string>Authorizations
A whk_-prefixed API key (opaque; not a JWT).
Response
Success.
Available options:
lifetime, billing_cycle Required range:
0 <= x <= 9007199254740991Required range:
0 <= x <= 9007199254740991Available options:
pause, allow Was this page helpful?