links

Call links.shorten

Get a tracked short link, with its UTMs, for a web address going out in a post, email, ad or text — 'shorten this link for the post', 'give me a trackable link for this email'. A short version of an address is this link, never a summary of the page. Returns the short link to use in the copy, and the UTMs it carries: source, medium and campaign are made from what it goes out on and the address unless the member names their own utm_source, utm_medium or campaign, which it takes. Calling it twice for the same piece on the same platform returns the SAME link rather than making a second one, so it is safe to re-run. The link goes out on whichever name this brand's links carry; use links.domain_set to change that. Not for how many clicks a link had — that is links.report.

Every result names the workspace it ran in. Say which workspace the answer is about. When the account has more than one workspace and none is selected, this tool refuses with workspace_ambiguous and lists the choices — offer them, never pick one.

post/api/v1/tools/links.shorten

Request

  • Base URL: https://app.goosybear.ai
  • URL: https://app.goosybear.ai/api/v1/tools/links.shorten
  • Auth: HTTP bearer

Headers

x-request-idstring

Your own id for this request, echoed back and recorded on the audit trail. 1–128 characters from A–Z a–z 0–9 . _ : -, starting with a letter or digit; anything else is replaced by a generated id.

Request body

target_urlstring required

The secure (https) web address people should land on. Always a page this brand owns.

source_kind'post_version' | 'email' | 'ad' | 'sms' | 'link_page' | 'manual' required

What the link is going out ON. Use manual only when it belongs to nothing in the system.

source_idstring

The id of the post, email, ad or page it belongs to. Required for every kind except manual — it is what makes re-running this safe.

platformstring

Where it is going out: instagram, facebook, linkedin, email, sms… Defaults to manual.

campaignstring nullable

The campaign this belongs to; it is also the link's utm_campaign. Leave it out to take the one made from the address.

utm_sourcestring

Only when the member names a different utm_source. Leave it out to take the one made from the platform.

utm_mediumstring

Only when the member names a different utm_medium. Leave it out to take the one made from what the link goes out on.

workspacestring

Which workspace to run in — its slug. Omit to use your default. With more than one reachable workspace and no default, the call is refused and the choices are listed.

Response

The call was admitted and dispatched. ok says whether the tool succeeded — a refusal the tool itself produced is still a 200, exactly as it is a successful JSON-RPC result over MCP.

OR

Changes

No recorded changes to this operation across all 6 revisions of this API.