---
title: "Update a share link"
method: PATCH
path: "/shares/{shareId}"
---

# Update a share link

`PATCH /shares/{shareId}`

## Request

- Base URL: `https://www.useanyfile.com/api/v1`
- URL: `https://www.useanyfile.com/api/v1/shares/{shareId}`
- Auth: HTTP bearer

## Path parameters

- `shareId` string, required

## Request body

- UpdateShareInput
  - `isActive` boolean
  - `expiresAt` string, date-time, nullable

## Response `200`

Updated share link

- object
  - `data` Share, required
    - `id` string, required
    - `isActive` boolean, required
    - `expiresAt` string, date-time, nullable, required
    - `viewCount` integer, required
    - `downloadCount` integer, required
    - `createdAt` string, date-time, required
    - `publicUrl` string, uri, required

## Other responses

- `400`: Structured AnyFile API error
- `401`: Structured AnyFile API error
- `403`: Structured AnyFile API error
- `404`: Structured AnyFile API error
- `409`: Structured AnyFile API error
- `429`: Structured AnyFile API error

---

[API](https://skmtc.dev/useanyfile/apis/anyfile-rest-api.md) · [All operations](https://skmtc.dev/useanyfile/apis/anyfile-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/useanyfile/apis/anyfile-rest-api/revisions/bad3e5a8e395?raw)
