# POST /shortlinks

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

Create a TrustPager Shortlink: https://trustpager.link/<name> sends people to destination_url (a temporary redirect, so later edits take effect). Choose the name or leave it out for a random one. Links to TrustPager forms, booking pages and this workspace's TrustPager websites record which link brought each lead, for 30 days after the click; links anywhere else count clicks only (tracks_leads in the answer says which). At most 300 new links per workspace per hour.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `destination_url` | body | string | yes | 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. |
| `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 POST   "https://api.trustpager.com/functions/v1/api/v1/shortlinks"   -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`