---
# @generated by sylphx-gen. Do not edit.
title: "Revoke an entitlement grant"
description: "`money.entitlement_grants.revoke` (POST /v1/{name}:revoke): Ends a manual or test grant early without touching payments or the ledger."
type: reference
product: payments
summary: "Ends a manual or test grant early without touching payments or the ledger."
nav: false
---

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](/docs/api/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`](/docs/api/errors/UNAUTHENTICATED) — No valid key or token was presented.
- [`PERMISSION_DENIED`](/docs/api/errors/PERMISSION_DENIED) — The key lacks the method's permission.
- [`RESOURCE_NOT_FOUND`](/docs/api/errors/RESOURCE_NOT_FOUND) — The named Resource does not exist or is not visible.
- [`INVALID_FIELD`](/docs/api/errors/INVALID_FIELD) — A field failed validation.
- [`UNKNOWN_FIELD`](/docs/api/errors/UNKNOWN_FIELD) — The request has a field the schema does not know.
- [`INVALID_STATE`](/docs/api/errors/INVALID_STATE) — The Resource is in a state that forbids the call.
- [`RESOURCE_ALREADY_EXISTS`](/docs/api/errors/RESOURCE_ALREADY_EXISTS) — A Resource with this name exists.

Every error arrives in the body [Errors](/docs/platform/errors) describes.

## Examples

**cURL**

```curl
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":"…"}'
```

**TypeScript**

```ts
const response = await sylphx.money.entitlementGrants.revoke({ name: 'orgs/acme/projects/shop/envs/production/entitlement_grants/entitlement-grant', reason: '…' })
```

**Rust**

```rust
let mut req = sylphx::money::RevokeEntitlementGrantRequest::default();
req.name = "orgs/acme/projects/shop/envs/production/entitlement_grants/entitlement-grant".to_string();
req.reason = "…".to_string();
let response = sx.money().entitlement_grants().revoke(req).await?;
```

**CLI**

```bash
sylphx money entitlement-grants revoke orgs/acme/projects/shop/envs/production/entitlement_grants/entitlement-grant --yes
```

**MCP**

```json
{ "method_id": "money.entitlement_grants.revoke", "args": {"name":"orgs/acme/projects/shop/envs/production/entitlement_grants/entitlement-grant","reason":"…"} }
```
