Skip to main content
Custom claims are values Grantiva injects into the JWT minted after successful attestation. Define them once here; every subsequent token for your organization carries them. See Custom Claims Concepts for how each claim type is evaluated.

Authentication

All endpoints require a dashboard session (cookie-based) and organization membership.
  • Read and test operations (list, get, test, preview): any organization member.
  • Write operations (create, update, delete, bulk, reorder): Admin role or above.

Claim definition fields

Conditional rules

Each entry in conditionalRules:
  • operatorAND or OR, joining the conditions.
  • field — one of device_model, os_version, app_version, risk_score, attestation_count, country, jailbreak_detected, device_integrity, first_seen_days, suspicious_events.
  • Condition operator — one of equals, not_equals, greater_than, less_than, greater_than_or_equal, less_than_or_equal, contains, not_contains, starts_with, ends_with, regex, in_list, not_in_list.

External config (Enterprise)

authentication.type is one of basic, bearer, api_key, oauth2.

Validation rules

Reserved keys

subscription (any casing) is reserved — it is managed by Grantiva’s entitlement ingestion (Apple IAP / Stripe) and injected into tokens automatically. Creating a claim with this key returns 400 Bad Request. See Subscription Claims.

List claims

Returns all claim definitions for your organization, sorted by priority then key. Response

Get a claim

Returns a single claim definition (same shape as list entries).

Create a claim

Requires Admin role. Request body
Include exactly the type-specific field your claimType requires (staticValue, conditionalRules, dynamicExpression, or externalConfig). validationRules is optional for all types. Response — the created claim (same shape as list entries).

Update a claim

Requires Admin role. All fields optional; claimKey and claimType cannot be changed. Only the configuration field matching the claim’s existing type is applied.

Delete a claim

Requires Admin role. Response204 No Content

Bulk create

Requires Admin role. Body is a JSON array of create requests. All entries are validated first; the batch fails as a whole if the total would exceed your tier’s claim limit. Not available on the Free tier. Response — array of created claims.

Reorder claims

Requires Admin role. Request body
Array index becomes the new priority. IDs not found (or not owned by your organization) are skipped. Updates run in a single transaction. Response204 No Content

Test a claim configuration

Evaluates an unsaved claim configuration against a simulated device — nothing is persisted. Any member can call this. Request body
deviceProfile.keyId, riskScore, attestationCount, and jailbreakDetected are required when a profile is provided; the other profile fields are optional. Response

Preview a saved claim

Same as test, but evaluates an existing saved claim — the body contains only testContext. Returns the same response shape.

Tier limits

Limits count active claims only.

Errors

See also