> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vertracloud.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Revoke a Share Link

> Revokes a share link of a private template so nobody can use it again, without affecting what was already created from it.

This call revokes a share link: it accepts no new use and stops offering updates to what was created from it. Applications and stacks already created from the link keep running, and copies already made stay with their owners. Revoking is idempotent: revoking a revoked link answers with the link as it is.

Needs the `templates:write` scope when called with an API key. Only the owner of the template can revoke its links.

**template\_id** `string` *required*

The template ID.

**link\_id** `string` *required*

The link ID.

**workspace\_id** `string`

If the template belongs to a workspace, the workspace's ID.

```bash cURL theme={null}
curl -X DELETE https://api.vertracloud.app/v1/templates/tpl-abc123def456/share-links/lnk-abc123def456 \
  -H "Authorization: Bearer $VERTRA_API_KEY"
```

### Response

**response** `object`

The link, with `revoked_at` filled.

**Toggle object**

**id** `string`

The link ID.

**template\_id** `string`

The template the link belongs to.

**mode** `string`

`use` or `full_copy`.

**last4** `string`

The last 4 characters of the token, to tell links apart.

**uses** `integer`

How many times the link was used.

**max\_uses** `integer | null`

The maximum number of uses, or `null` for no limit.

**expires\_at** `string | null`

When the link expires, or `null` when it does not expire.

**revoked\_at** `string | null`

When the author revoked the link, or `null`.

**created\_at** `string`

When the link was created.

```json Response theme={null}
{
  "response": {
    "id": "lnk-abc123def456",
    "template_id": "tpl-abc123def456",
    "mode": "use",
    "last4": "x9Qa",
    "uses": 3,
    "max_uses": 10,
    "expires_at": null,
    "revoked_at": "2026-10-27T16:00:00Z",
    "created_at": "2026-10-27T14:02:00Z"
  }
}
```

### Error Responses

**code** `string`

The error code indicating the reason for the failure. Possible values:

* `API_KEY_SCOPE_DENIED`: The API key does not have the `templates:write` scope (`403`).
* `TEMPLATE_NOT_FOUND`: The template does not exist or is not yours (`404`).
* `SHARE_LINK_NOT_FOUND`: The link does not exist in that template (`404`).
* `WORKSPACE_OWNER_ONLY`: Only the workspace owner revokes the links of its templates.

```json Error Response theme={null}
{
  "code": "SHARE_LINK_NOT_FOUND"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.