GraphQL endpoint
https://app.monetizekit.app/api/graphql
Query operations
OBJECT Query
| Field | Type | Arguments | Complexity | Description | Deprecated |
|---|---|---|---|---|---|
plan | Plan | key: String! (required) | 4 | Get one plan with entitlements | No |
customers | [Customer] | first: Int, after: String | 6 | List customers | No |
entitlementCheck | EntitlementDecision | customerId: ID! (required), featureKey: String! (required) | 3 | Check one entitlement decision | No |
usageCounter | UsageCounter | customerId: ID! (required), meterKey: String! (required) | 3 | Fetch usage counter | No |
creditBalance | CreditBalance | customerId: ID! (required) | 3 | Fetch customer credits | No |
Curated examples
Plan with entitlements
query PlanWithEntitlements($key: String!) {
plan(key: $key) {
id
key
entitlements {
featureKey
value
}
}
}Variables
{
"key": "starter_monthly"
}Customers with subscriptions
query CustomersWithSubscriptions($first: Int) {
customers(first: $first) {
id
externalId
subscriptions {
id
planKey
}
}
}Variables
{
"first": 20
}Single entitlement check
query SingleEntitlement($customerId: ID!, $featureKey: String!) {
entitlementCheck(customerId: $customerId, featureKey: $featureKey) {
allowed
reason
}
}Variables
{
"customerId": "cust_dev_1001",
"featureKey": "analytics_export"
}Usage data
query UsageData($customerId: ID!, $meterKey: String!) {
usageCounter(customerId: $customerId, meterKey: $meterKey) {
meterKey
current
limit
}
}Variables
{
"customerId": "cust_dev_1001",
"meterKey": "api_requests"
}Credit balances
query CreditBalances($customerId: ID!) {
creditBalance(customerId: $customerId) {
available
pending
}
}Variables
{
"customerId": "cust_dev_1001"
}