Menu
Platform
AI
App store purchases
Database
Flags
Jobs and cron
Localization
Monitoring
Notifications
Payments
Queues
Sandboxes
Webhooks
Getting Started
Authentication
KV Store
Deploy & Infrastructure
Reference
Check an entitlement grant
Answers whether a subject holds a feature now, and how much of it.
Answers whether a subject holds a feature now, and how much of it.
- Path
POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/entitlement_grants:check - Scope
billing:read - Effect
read— nothing is written. - Collection entitlement_grants
#Request
| Field | Type | What it is |
|---|---|---|
parent | string | The environment to check in. Required. |
subject | Subject | Who. Required. |
feature | string | The feature key. Required. |
#Subject
| Field | Type | What it is |
|---|---|---|
end_user | string | An end user's id (Sylphx Auth, or the app's own OIDC issuer). One of the kind group. |
customer_organization | string | A customer organization's id. One of the kind group. |
#Response
| Field | Type | What it is |
|---|---|---|
entitled | bool | Whether the subject holds the feature now. |
limit | string | For a limit feature, the largest allowance the subject holds. |
entitlement_grant | string | The grant that answers, when entitled. |
expire_time | timestamp | When the answering grant ends; unset for no end. A caller may cache the answer until then. |
#Errors
UNAUTHENTICATED— No valid key or token was presented.PERMISSION_DENIED— The key lacks the method's permission.INVALID_FIELD— A field failed validation.
Every error arrives in the body Errors describes.
#Examples
curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/entitlement_grants:check" \
-H "Authorization: Bearer $SYLPHX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"feature":"…","subject":{}}'