Set the developer-authoritative entitlement (tier) for one of your end users. The tier is stamped into the client-token plan claim at the next mint, so the per-plan policy engine enforces it — the effective entitlement always wins over any plan a client or IdP asserts at mint time. A typical caller is your App Store Server Notification handler, on an upgrade or downgrade.

Authentication

This is the anti-self-upgrade gate: it is authenticated with a secret key only (rd_sk_…). A client token and a publishable key are both rejected 403 permission_error (client_token_cannot_mint), so a client or device can never raise its own tier.

Path parameters

Request body

Example

Response

200 OK:
  • entitled_since — recorded on the first non-free grant and never reset on a later downgrade; null if the end user has never been entitled.
  • entitlement_expires_at / entitlement_sourcenull when not set.
Idempotent, last-write-wins on (project, external_id). The end user is created on first use if it does not yet exist, and each write is recorded to the audit log.

Errors

Failures use the error envelope:
  • 400 invalid_request_error — a malformed path or body (invalid_request).
  • 401 authentication_error — a bad or missing key.
  • 403 permission_error — a client token or publishable key (client_token_cannot_mint).