---
title: "Create or remove public link"
method: POST
path: "/operations/publiclink"
---

# Create or remove public link

`POST /operations/publiclink`

Creates a share URL for an object or removes an existing link when `unlink=true`.

## Query parameters

- `fs` string
- `remote` string
- `unlink` boolean
- `expire` string
- `_group` string
- `_async` boolean

## Headers

- `Prefer` 'respond-async'

## Request body

- OperationsPubliclinkRequest
  - `fs` string — Remote name or path hosting the object for which to manage a public link.
  - `remote` string — Path within `fs` to the object for which to create or remove a public link.
  - `unlink` boolean — Set to true to remove an existing public link instead of creating one.
  - `expire` string — Optional expiration time for the public link, formatted as supported by the backend.
  - `_group` string — Assign the request to a custom stats group.
  - `_async` boolean — Run the command asynchronously. Returns a job id immediately.

## Response `200`

Public sharing URL returned by `operations/publiclink`.

- object
  - `url` string, uri, required

## Other responses

- `202` — Request accepted for async processing. Poll /job/status with the returned jobid.
- `4XX` — Any error response (HTTP 4xx/5xx)
- `5XX` — Any error response (HTTP 4xx/5xx)

---

[API](https://skmtc.net/rclone/apis/rclone-rc-api.md) · [All operations](https://skmtc.net/rclone/apis/rclone-rc-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rclone/rclone-rc-api/versions/2849bf2803ce/schema)
