> ## Documentation Index
> Fetch the complete documentation index at: https://wordsmithai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Revoke support access grant

> End a support access request or grant early.

Ends a [support access grant](https://wordsmithai.mintlify.site/api-reference/support-access/list-support-grants.md) at once, whether it is awaiting approval, scheduled or active. The engineer loses access on their next request. A revoked grant cannot be reopened: raise a new request instead.

## Authentication

Requires an API key, or an OAuth token with `directory:admin`. `directory:admin` is never granted by default. The caller must be the grant's data owner, or hold a role with the manage support access permission. The support member itself cannot revoke. A Wordsmith support member is always refused, whatever role it holds. Support access must be turned on for your organisation.

## Path parameters

**grant\_id** `string` *required*

The grant's id.

## Body parameters

**reason** `string`

Why it is closed early, up to 2,000 characters. Recorded on the grant.

## Response

Returns `200` with the closed grant.

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST "https://api.wordsmith.ai/api/v1/support-access/grants/9d4c2b7a-1f3e-4a5b-8c6d-7e8f9a0b1c2d/revoke" \
  -H "Authorization: Bearer sk-ws-api1-your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "Fixed; access no longer needed."
}'
```

```json Response theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "9d4c2b7a-1f3e-4a5b-8c6d-7e8f9a0b1c2d",
  "member_id": "5b0e6f1e-8a43-4f0e-9d0a-3e2c51f8a7b4",
  "requested_by": "4c98ef69-d5ef-4471-a2b8-89ded5b7b121",
  "requested_by_wordsmith": false,
  "ticket_ref": "SUP-1042",
  "ticket_url": "https://support.example.com/tickets/1042",
  "justification": "Reproduce the export failure on the Q3 supplier contracts repository.",
  "data_owner_id": "828b17cf-5f09-4edd-bcba-9d1de130a2e6",
  "scope": "resources",
  "resources": [
    {
      "kind": "repository",
      "id": "0f6a3c1e-2b4d-4e8f-9a1b-3c5d7e9f1a2b",
      "name": "Supplier contracts Q3"
    }
  ],
  "role_id": "72f02d30-2d67-40b0-b5cb-859dbb45d485",
  "starts_at": "2026-11-17T10:00:00Z",
  "ends_at": "2026-11-17T14:00:00Z",
  "separate_approvers": false,
  "required_approvals": [
    "admin"
  ],
  "requested_at": "2026-11-17T09:55:00Z",
  "approval_expires_at": "2026-11-18T09:55:00Z",
  "status": "revoked",
  "phase": "closed",
  "approvals": [
    {
      "role": "data_owner",
      "user_id": "828b17cf-5f09-4edd-bcba-9d1de130a2e6",
      "approved": true,
      "decided_at": "2026-11-17T09:58:00Z",
      "comment": null
    },
    {
      "role": "admin",
      "user_id": "1d7e3a52-6b8c-4f9d-a0e1-2b3c4d5e6f70",
      "approved": true,
      "decided_at": "2026-11-17T09:59:00Z",
      "comment": "Approved for the export bug only."
    }
  ],
  "closed_by": "1d7e3a52-6b8c-4f9d-a0e1-2b3c4d5e6f70",
  "closed_by_wordsmith": false,
  "closed_at": "2026-11-17T11:30:00Z",
  "close_reason": "Fixed; access no longer needed."
}
```

## Errors

| Status | `error_code` | When |
| - | - | - |
| 400 | `invalid_request_body` | `reason` is not a string or is too long. |
| 403 | `insufficient_scope` | The OAuth token does not hold `directory:admin`. |
| 403 | `forbidden` | The caller lacks the support access permission, is a Wordsmith support member, or support access is off for your organisation. |
| 403 | `forbidden` | The caller may not revoke this grant. |
| 404 | `resource_not_found` | No grant in your organisation has this id, or the caller may not see it. |
| 409 | `resource_conflict` | The grant has already ended, lapsed or expired, or it changed at the same moment. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.