# revokeShareGrant

Source: /openapi/thomas-federated.openapi.json

## Operation

| Method | URL |
|---|---|
| DELETE | https://api.thomas.co/v1/share-grants/{id} |

| Field | Value |
|---|---|
| operationId | revokeShareGrant |
| method | DELETE |
| server | https://api.thomas.co/v1 |
| path | /share-grants/{id} |
| tags | `Sharing` |
| summary | Revoke a share grant the caller owns |
| badges | None |

## Request Parameters

| Name | In | Required | Schema | Description |
|---|---|---|---|---|
| id | path | true | string |  |

## Request Body

None.

## Responses

| Status | Description | Schema refs |
|---|---|---|
| 200 | The revoked share grant | #/components/schemas/ShareGrantResponseDto |
| 400 | Malformed share-grant id path parameter | #/components/schemas/ApiErrorResponseDto |
| 401 | Invalid or missing authentication token (AUTH_TOKEN_INVALID) | #/components/schemas/ApiErrorResponseDto |
| 404 | Share grant not found or not owned by the caller (no existence leak) | #/components/schemas/ApiErrorResponseDto |
| 409 | The grant is org-configured and not individually revocable | #/components/schemas/ApiErrorResponseDto |

## Artifact Examples

### Response 400 example

```json
{
  "statusCode": 400,
  "message": "Validation failed (uuid is expected)",
  "error": "HTTP_BAD_REQUEST"
}
```

### Response 401 example

```json
{
  "statusCode": 401,
  "message": "Invalid or missing authentication token",
  "error": "AUTH_TOKEN_INVALID"
}
```

### Response 404 example

```json
{
  "statusCode": 404,
  "message": "Share grant not found",
  "error": "SHARE_GRANT_NOT_FOUND"
}
```

### Response 409 example

```json
{
  "statusCode": 409,
  "message": "This grant is org-configured and cannot be revoked",
  "error": "PRIVACY_ORG_CONFIGURED_NOT_REVOCABLE"
}
```
