# Change a short link

Renames a short link, points it somewhere else, or pauses it (enabled: false).

|  |  |
| --- | --- |
| REST | `PATCH /api/v1/agents/{agent_id}/short-links/{short_link_id}` |
| MCP tool | `update_short_link` |
| Classification | **Sensitive write** |
| Scope | `agents:write` |
| Minimum role on the agent | editor |
| Confirmation | Required: `confirm: true`, after the person agrees |
| Retry safety | Safe to retry with the same input |
| Success status | 200 |

## What it does

Renames a short link, points it somewhere else, or pauses it (enabled: false). Changing the address or pausing needs confirm: true, since people who already have the link are affected.

## Side effects

Changes where the link goes, its name, or pauses it. People who already have the link are affected.

## Inputs

| Name | Type | Required | In | Description |
| --- | --- | --- | --- | --- |
| `agent_id` | string | yes | path | The agent id (agt_...), from list_agents. |
| `short_link_id` | string | yes | path | The short link id, from list_short_links. |
| `url` | string | no | body | A new public http(s) address. |
| `title` | string | no | body |  |
| `enabled` | boolean or "true" \| "false" | no | body | true or false |
| `confirm` | true | no | body | Set to true after reviewing the effect with the person you work for. Required for destructive operations. |

## Example

REST:

```bash
curl -X PATCH "https://covo.lanaai.io/api/v1/agents/agt_4edc89bb2964/short-links/33f5aef6-f05a-4a0e-8716-76aed5e209f9" \
  -H "Authorization: Bearer $COVO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"title":"Spring menu 2026"}'
```

MCP (POST /mcp):

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_short_link",
    "arguments": {
      "agent_id": "agt_4edc89bb2964",
      "short_link_id": "33f5aef6-f05a-4a0e-8716-76aed5e209f9",
      "title": "Spring menu 2026"
    }
  }
}
```

## Response

Returns an object with `id`, `short_url`, `url`, `title`, `enabled`, `clicks`, `total_clicks`, `last_clicked` and `created_at`. This is a real response, shortened to two items per list.

200 response:

```json
{
  "id": "33f5aef6-f05a-4a0e-8716-76aed5e209f9",
  "short_url": "https://covo.lanaai.io/go/NAqH5mp",
  "url": "https://example.com/spring-menu",
  "title": "Spring menu 2026",
  "enabled": true,
  "clicks": 0,
  "total_clicks": 0,
  "last_clicked": null,
  "created_at": "2026-10-07T20:14:42.017Z"
}
```

Over MCP the same object comes back as the tool result, in `structuredContent` and as JSON text.

## Errors

| Status | Code | Meaning |
| --- | --- | --- |
| 401 | `unauthorized` | No token, or it is unknown, revoked or expired. OAuth apps refresh or reconnect. |
| 403 | `account_suspended` | The account that owns the token is paused. |
| 403 | `insufficient_scope` | The token lacks `agents:write`. |
| 404 | `agent_not_found` | Unknown agent, or not reachable with this token. |
| 400 | `bad_request` | An input is invalid; `field` names it. |
| 409 | `confirmation_required` | Review the effect with the person you work for, then send `confirm: true`. |
| 429 | `rate_limited` | Wait `Retry-After` seconds. |
