# Revoke Share Link

- **Method:** `POST`
- **Path:** `/api/v1/shares/{share_id}/revoke`
- **Operation ID:** `revoke_share_link`
- **Tags:** shares

Stop a public link playing: the next request for it is refused, a video already playing included once it
asks for its next range. Any key or member of your tenant that may write runs can revoke any of its links,
not only the one who minted it.

The link's record stays, with who revoked it and when, so the list still says what was shared. Asking again
answers the same record. Another tenant's link is the 404 an unknown id gets.

## Effective servers

- `https://api.saram.sh`

  Saram

## Authentication

- **HTTPBearer**: HTTP bearer

  a Saram API key (`sk_saram_<env>_...`) or a person's AuthKit access token, as `Authorization: Bearer <credential>`. Both are told apart by shape and produce the same principal.

## Path parameters

- **`share_id` (required)**: `string`

## Responses

### 200 The link is revoked, now or by an earlier request.

**Content type:** `application/json`

schema: `ShareSummary`, no additional properties

One public link to a session's replay, as the list and the revocation answer it. Never the link itself.

- **`created_at` (required)**: `string`, format: `date-time`
- **`created_by` (required)**: `string`
- **`expires_at` (required)**: `string`, format: `date-time`
- **`id` (required)**: `string`
- **`run_id` (required)**: `string`
- **`session_id` (required)**: `string`
- **`state` (required)**: `string`, possible values: `"live", "expired", "revoked"`

  live plays, expired and revoked do not. Read it beside ShareList.public\_shares: while your tenant's sharing is off no link plays, whatever its state.
- **`token_hint` (required)**: `string`

  The link's last four characters, to tell your links apart.
- **`view_count` (required)**: `integer`

  How many times the replay was opened. Nothing about who opened it is kept.
- **`caller`**: `string | null`

  Who minted it, in words, when the credential had a name.
- **`last_viewed_at`**: `string | null`, format: `date-time`
- **`revoked_at`**: `string | null`, format: `date-time`
- **`revoked_by`**: `string | null`

  Who revoked it: any principal of your tenant that may write runs can.

**Example:**

```json
{
  "id": "",
  "run_id": "",
  "session_id": "",
  "token_hint": "",
  "state": "live",
  "created_at": "",
  "created_by": "",
  "caller": "",
  "expires_at": "",
  "revoked_at": "",
  "revoked_by": "",
  "view_count": 1,
  "last_viewed_at": ""
}
```

### 403 the API key lacks the required scope

### 404 no link of yours has that id - the same answer for another tenant's link as for none

### 422 Validation Error

**Content type:** `application/json`

schema: `HTTPValidationError`

- **`detail`**: `array`

  **Items:**

  schema: `ValidationError`
  - **`loc` (required)**: `array of (string | integer)`
  - **`msg` (required)**: `string`
  - **`type` (required)**: `string`
  - **`ctx`**: `object`
  - **`input`**: `any`

**Example:**

```json
{
  "detail": [
    {
      "loc": [
        ""
      ],
      "msg": "",
      "type": "",
      "input": null,
      "ctx": {}
    }
  ]
}
```

## Schemas

- `HTTPValidationError` — shown above.
- `ShareSummary` — shown above.
- `ValidationError` — shown above.
