EaserixDocs
DevelopersAPI referenceLinksLinks

Delete a link

Permanently deletes the link and its click history. Owner-only: a link shared with the caller by a teammate is readable but returns 403 here.

View as Markdown
DELETE
/v1/links/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/v1/links/string"
{  "message": "string"}

Update destination, title, code, tags, expiration, visibility, campaign, usage limits, password, retargeting, or state

Partial update — only provided fields change. Setting active=false disables the public redirect without deleting history; archived=true hides the link from the default list and pauses its redirect. shortCode changes are validated for format, reservation, and uniqueness (409 on conflict). An empty expiresAt clears the expiration. Owner-only: a link shared with the caller by a teammate is readable but returns 403 here. Changing active or archived is audited, once per actual change, under the same names as the bulk endpoint (link.paused / link.activated / link.archived / link.unarchived) — see batchLinks for where to read the log. Changes to the destination, short code, click/QR scan limits, expiry and password are audited the same way, once per field that actually changed: link.destination_changed, link.short_code_changed, link.limits_changed, link.expiry_changed, link.retargeting_changed, link.password_set and link.password_removed. Entries carry the old and new value, except that destinations are recorded without their query string or fragment (they can carry tokens) and a password or its hash is never recorded. campaignId follows the same omit/empty-string convention as expiresAt: omitted leaves the campaign unchanged, "" clears it (the link's UTM snapshot and destinationUrl are left exactly as they are — clearing only detaches the association), and any other value re-points the link to that campaign (must belong to the caller's own workspace and not be archived, 400 otherwise), copying its current UTM values onto the link and re-applying them to destinationUrl (EAS-73). clickLimit and qrScanLimit (EAS-85) follow an omit/0 convention instead: omitted (or JSON null) leaves the limit unchanged, 0 clears it (unlimited), and a positive integer up to 1,000,000,000 sets it (negative or larger is rejected, 400). A change takes effect on the very next redirect, and also resets that kind's usage counter (getLink's clicksUsed/qrScansUsed) back to 0 — so lowering a limit below what's already been used against it starts denying immediately against a fresh count, and raising or clearing an exhausted limit starts allowing again immediately. Re-sending the same value is a no-op and does not reset anything. This never affects link.clicks, which is a separate, permanent lifetime counter. password follows an omit/empty-string convention too: omitted leaves the gate unchanged, "" removes it, and any other value (4-72 characters) sets/replaces it — write-only, never returned by this or any other endpoint (see Link.passwordProtected). retargeting (EAS-78) is merged onto the link's stored config under the same row lock the rest of the update uses, so concurrent PATCHes — one toggling enabled, one editing pixels — each keep the other's field. Omitted fields are left as they are; a pixels array replaces the whole list (send [] to clear it); enabled: false keeps the list. Takes effect on the next redirect on every replica.

QR code for a short link (PNG)

PNG QR code encoding the link's short URL. size is clamped to 128–1024 (default 512); download=1 switches the Content-Disposition to attachment. EAS-85: the encoded URL carries this link's persistent QR token (esrx.ly/<code>?qr=<token>), generated on first request and unchanged after — so re-fetching or re-downloading the code (any size/style) always encodes the same token, and an already-printed QR code keeps working. That token is what lets the redirect distinguish a QR scan from an ordinary click for qrScanLimit enforcement (EAS-85); it is never exposed as its own field, only embedded in this PNG. EAS-81: renders with the link's persisted qrStyle/qrLogoUrl by default. pattern/corner/fg/bg override the persisted style for THIS response only, without saving anything — the customize panel uses this to preview unsaved changes through the same real rendering path (see PUT .../qr/style to persist). A custom logo (qrLogoUrl) wins if set; otherwise every link renders with Easerix's small default logo until qrLogoRemoved is true. Having any logo at all — custom or default — automatically renders at High error correction instead of the default Medium; never controlled by the caller. If no supported adjustment produces a scannable code, this returns 422 instead of a PNG.