Skip to main content
POST
/
api
/
public
/
can-access
curl -X POST "https://app.crovver.com/api/public/can-access" \
  -H "x-public-key: pk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "requestingEntityId": "workspace_123",
    "featureKey": "advanced_analytics"
  }'
{
  "success": true,
  "data": {
    "canAccess": true,
    "featureKey": "advanced_analytics",
    "requestingEntityId": "workspace_123"
  }
}
Returns whether the tenant’s active plan includes the requested feature. For multi-product orgs, pass productSlug to scope the check to a specific product’s subscription. If the feature is backed by a credit pool, also returns the available credit balance.

Request Body

requestingEntityId
string
required
The external tenant ID from your application
featureKey
string
The feature key to check (must match a key in plan.features). Optional when productSlug is provided — omitting it performs a subscription-existence check (returns true if the tenant has any active/trial subscription for that product).
productSlug
string
Scope the check to a specific product (e.g. product-a). Required for multi-product orgs. At least one of featureKey or productSlug must be provided.
amount
integer
For credit-backed features: number of credits needed. Defaults to 0 (balance check only).

Authentication

Requires a public key (x-public-key: pk_live_...) or secret key (Authorization: Bearer sk_live_...).

Response

data.canAccess
boolean
Whether the tenant can access the feature or has an active subscription for the product
data.featureKey
string
Echoed feature key (absent when only productSlug was provided)
data.productSlug
string
Echoed product slug (when provided)
data.requestingEntityId
string
The tenant ID that was checked
data.credits
object
Only present when the feature maps to a credit pool.
curl -X POST "https://app.crovver.com/api/public/can-access" \
  -H "x-public-key: pk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "requestingEntityId": "workspace_123",
    "featureKey": "advanced_analytics"
  }'
{
  "success": true,
  "data": {
    "canAccess": true,
    "featureKey": "advanced_analytics",
    "requestingEntityId": "workspace_123"
  }
}