# PATCH /shortlinks/:shortlink_id

**Resource:** [SHORTLINKS](./shortlinks.md)  
**MCP tool:** `update_shortlink`  
**Scopes:** `shortlinks:write`  
**Write operation:** yes

Change a short link. Send only the fields to change; null clears an optional field. Changing destination_url takes effect within about a minute. Renaming (name): printed or posted copies of the old name keep working for 30 days, then stop; the old name stays reserved for this workspace and is never given to anyone else. Check a new name first with check_shortlink_name.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `shortlink_id` | path | string | yes | The short link id, from list_shortlinks or create_shortlink. Example: "5b0c7d2e-1f3a-4c55-9a1e-2d8f6b7a9c10". |
| `destination_url` | body | string | no | Where people land after clicking, a full http or https address. Example: "https://app.trustpager.com/form/acme-roofing/free-quote". Not allowed: script or data addresses, IP addresses, other short links (bit.ly and similar), and signed-in TrustPager pages. |
| `name` | body | string | no | The part after trustpager.link/. Example: "roof-repair" gives https://trustpager.link/roof-repair. Leave it out for a random 6-character name such as "k7mp2x". Lower case letters, numbers and hyphens, 3 to 40 characters, no hyphen at the start or end and no two hyphens in a row. Case is ignored (Roof-Repair is saved as roof-repair). Names on trustpager.link are first come first served across every TrustPager workspace. Reserved words (admin, api, app, login, help, www and similar) and anything that looks like TrustPager itself (trustpager, support, billing, security) are refused. Check a name first with check_shortlink_name. |
| `label` | body | string | no | Your own name for the link, shown in lists, up to 200 characters. Example: "Spring roof repair Facebook post". |
| `campaign` | body | string | no | Groups links for reporting, up to 200 characters. Example: "spring-2026". |
| `utm_source` | body | string | no | Added to the destination as utm_source when the address does not already have it. Example: "facebook". |
| `utm_medium` | body | string | no | Added to the destination as utm_medium. Example: "social". |
| `utm_campaign` | body | string | no | Added to the destination as utm_campaign. Example: "spring-2026". |
| `utm_term` | body | string | no | Added to the destination as utm_term. Example: "roof repair". |
| `utm_content` | body | string | no | Added to the destination as utm_content. Example: "video-post". |
| `source_type` | body | string | no | What the link was made for, up to 40 characters. Example: "social_post", "email", "ad", "qr_code", "sms", "print". |
| `source_id` | body | string | no | The id of the thing it was made for, such as a social post id. Example: "5b0c7d2e-1f3a-4c55-9a1e-2d8f6b7a9c10". |
| `expires_at` | body | string | no | When the link stops working, ISO 8601 with a time zone. Example: "2026-12-31T23:59:00+11:00". Leave out (or send null on update) for no expiry. After this time visitors see a "This link has expired" page. |
| `is_active` | body | boolean | no | false turns the link off (visitors see "This link has been turned off"); true turns it back on. Example: false. |
| `require_approval` | body | boolean | no | Optional. Set true to route this write into the approval queue for human review instead of executing it immediately (returns 202 + an approval_id). Works even when your key/token has permission to execute directly. |

## Request example

```bash
curl -X PATCH   "https://api.trustpager.com/functions/v1/api/v1/shortlinks/:shortlink_id"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"destination_url":"...","name":"...","label":"..."}'
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`