Archive a campaign (does not delete it)
Archives rather than hard-deleting (EAS-73): a campaign is the reporting dimension for every click already recorded against links that used it, and a hard delete would either orphan those links' campaignId or erase campaign-level history. Existing links and their analytics are completely unaffected — this only stops the campaign from being selectable for new links. Idempotent.
View as MarkdownAuthorization
bearer In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/v1/campaigns/string"{ "message": "string", "campaign": { "id": "string", "name": "string", "utmSource": "string", "utmMedium": "string", "utmCampaign": "string", "utmTerm": "string", "utmContent": "string", "archived": true, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }}Update a campaign, or archive/unarchive it
Partial update — only provided fields change. Renaming re-checks the per-workspace uniqueness constraint (409 on conflict). Editing UTM values only affects links created (or re-pointed to this campaign) AFTER the change — every link created earlier keeps the immutable snapshot it was given at that time (EAS-73). archived=true stops the campaign from being selectable for new links without touching any link already using it; archived=false un-archives it.
Which workspace a campaign is in, for a link that names no workspace
For an old link (`/links/campaigns/<id>`, an email from before workspace URLs), so the app can send the tab to `/links/w/<slug>/campaigns/<id>`. It works across the caller's workspaces: the token may be for any of them. It answers only when Links would let the caller read the campaign in its own workspace: they are a member with a product seat, Links is on there, and campaigns are readable by every member there; archived campaigns are located too. Every other case gets the same 404, byte for byte: no such campaign, one the caller can't read, Links turned off there, a record from before workspaces, a malformed id, or a request made with an API key or an OAuth grant (those are bound to one workspace by consent). Both answers are `Cache-Control: no-store`. Rate-limited per user and per client IP (the edge's CF-Connecting-IP), one limit across the three locate routes.