Revoke an entitlement grant
Ends a manual or test grant early without touching payments or the ledger.
Ends a manual or test grant early without touching payments or the ledger. Manual grants need billing:credits.approve; test grants need billing:test_grants:write. Paid and other derived grants cannot be revoked here. Repeating the same reason returns the original receipt; a different reason is RESOURCE_ALREADY_EXISTS. A grant that expired without being revoked returns INVALID_STATE.
- Path
POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/entitlement_grants/entitlement-grant:revoke - Scope
billing:test_grants:write - Effect
destructive— a successful call removes data; the CLI asks before it runs. - Collection entitlement_grants
Request
| Field | Type | What it is |
|---|---|---|
name | string | The full name of the manual or test entitlement grant. Required. |
reason | string | Why the grant is ending early. Use 1–500 bytes of printable text after trimming; do not include personal data or secrets. Required. |
Response
| Field | Type | What it is |
|---|---|---|
name | string | The full name of the revoked grant. |
reason | string | The accepted reason for ending the grant early. |
revoker | string | The authenticated principal that revoked the grant, set by Money. |
revoke_time | timestamp | When Money recorded the revocation. |
Errors
UNAUTHENTICATED— No valid key or token was presented.PERMISSION_DENIED— The key lacks the method's permission.RESOURCE_NOT_FOUND— The named Resource does not exist or is not visible.INVALID_FIELD— A field failed validation.UNKNOWN_FIELD— The request has a field the schema does not know.INVALID_STATE— The Resource is in a state that forbids the call.RESOURCE_ALREADY_EXISTS— A Resource with this name exists.
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/entitlement-grant:revoke" \
-H "Authorization: Bearer $SYLPHX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"reason":"…"}'