Python SDK
from metrifox_sdk import MetrifoxClient
client = MetrifoxClient(api_key="your_api_key")
# Check feature access
access = client.usages.check_access({
"feature_key": "feature_interview_booking",
"customer_key": "cust-6d11ca90",
"quantity": 5
})
print(access['data']['can_access']) # True/Falseimport { init } from "metrifox-js";
const metrifoxClient = init({
apiKey: process.env.METRIFOX_API_KEY
});
const access = await metrifoxClient.usages.checkAccess({
featureKey: "feature_interview_booking",
customerKey: "cust-6d11ca90",
});
require 'metrifox-sdk'
# Initialize with configuration
METRIFOX_SDK = MetrifoxSDK.init({ api_key: "your-api-key" })
# Check feature access
response = METRIFOX_SDK.usages.check_access({
feature_key: "feature_interview_booking",
customer_key: "cust-6d11ca90",
quantity: 10
})
puts response["can_access"] # true/false
curl --request GET \
--url https://api-meter.metrifox.com/usage/access \
--header 'x-api-key: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-meter.metrifox.com/usage/access",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-meter.metrifox.com/usage/access"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-meter.metrifox.com/usage/access")
.header("x-api-key", "<api-key>")
.asString();{
"data": {
"customer_key": "cust-mit7k5v8obzs",
"feature_key": "feature_seats",
"requested_quantity": 1,
"can_access": true,
"unlimited": false,
"balance": 4,
"used_quantity": 0,
"entitlement_active": true,
"prepaid": false,
"wallet_balance": 0,
"message": "Feature found"
}
}{
"message": "Validation failed",
"errors": {
"feature_key": [
"is required"
],
"customer_key": [
"is required"
]
}
}{
"message": "Unauthorized"
}{
"message": "Feature not found"
}Usage
Check User Access
Checks if a user has access to specific features and returns usage information including quotas, limits, and current usage.
GET
/
usage
/
access
Python SDK
from metrifox_sdk import MetrifoxClient
client = MetrifoxClient(api_key="your_api_key")
# Check feature access
access = client.usages.check_access({
"feature_key": "feature_interview_booking",
"customer_key": "cust-6d11ca90",
"quantity": 5
})
print(access['data']['can_access']) # True/Falseimport { init } from "metrifox-js";
const metrifoxClient = init({
apiKey: process.env.METRIFOX_API_KEY
});
const access = await metrifoxClient.usages.checkAccess({
featureKey: "feature_interview_booking",
customerKey: "cust-6d11ca90",
});
require 'metrifox-sdk'
# Initialize with configuration
METRIFOX_SDK = MetrifoxSDK.init({ api_key: "your-api-key" })
# Check feature access
response = METRIFOX_SDK.usages.check_access({
feature_key: "feature_interview_booking",
customer_key: "cust-6d11ca90",
quantity: 10
})
puts response["can_access"] # true/false
curl --request GET \
--url https://api-meter.metrifox.com/usage/access \
--header 'x-api-key: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-meter.metrifox.com/usage/access",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-meter.metrifox.com/usage/access"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-meter.metrifox.com/usage/access")
.header("x-api-key", "<api-key>")
.asString();{
"data": {
"customer_key": "cust-mit7k5v8obzs",
"feature_key": "feature_seats",
"requested_quantity": 1,
"can_access": true,
"unlimited": false,
"balance": 4,
"used_quantity": 0,
"entitlement_active": true,
"prepaid": false,
"wallet_balance": 0,
"message": "Feature found"
}
}{
"message": "Validation failed",
"errors": {
"feature_key": [
"is required"
],
"customer_key": [
"is required"
]
}
}{
"message": "Unauthorized"
}{
"message": "Feature not found"
}Usage endpoints are served from https://api-meter.metrifox.com. Other API calls stay on https://api.metrifox.com.You can provide either
feature_key or event_name when checking access.
Successful responses now include a data object with access details (balance, requested_quantity, entitlement status, prepaid flag, wallet_balance, etc.).Authorizations
Query Parameters
Feature key to check access for. Either feature_key or event_name is required.
The unique customer identifier in your application to check access for
Quantity to check access for. Defaults to 1 if not provided.
Response
Access check completed
Show child attributes
Show child attributes

