---
title: "Revoke a share link"
method: POST
path: "/v1/projects/{project_id}/files/{environment_id}/share-links/revoke"
tags: ["files"]
---

# Revoke a share link

`POST /v1/projects/{project_id}/files/{environment_id}/share-links/revoke`

## Request

- Base URL: `https://api.connic.co`
- URL: `https://api.connic.co/v1/projects/{project_id}/files/{environment_id}/share-links/revoke`
- Auth: HTTP bearer

Stop a share link from opening the file. Revoking cannot be undone.

Required permission: `files.manage`.

## Path parameters

- `project_id` string, uuid, required
- `environment_id` string, uuid, required

## Request body

- FileShareLinkRevokeRequest
  - `id` string, uuid, required: Share link ID from the file's share links.

## Response `200`

Successful Response

- FileShareLinkRevokeResponse
  - `id` string, required
  - `revoked_at` string, required

## Other responses

- `401`: Missing or invalid API key.
- `403`: The API key lacks the required permission or access to the environment.
- `404`: The resource does not exist in this project.
- `422`: Validation Error
- `429`: Rate limit exceeded.

## Changes

- **2026-11-08** `fcc823f825e2`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/connic/apis/connic-api/changes/v1/projects/:project_id/files/:environment_id/share-links/revoke/post.md)

---

[API](https://skmtc.dev/connic/apis/connic-api.md) - [All operations](https://skmtc.dev/connic/apis/connic-api/llms.txt) - [OpenAPI document](https://skmtc.dev/connic/apis/connic-api/revisions/da5f0d500a9d?raw)
