Links › Move a link to the trash

Links

Move a link to the trash

DELETE/api/{ORG}/links/{link}Permalink

Answers the Link.

Permission
Links · delete
Plan
Plans that include the API: Pricing
Retry
Safe with an Idempotency-Key

Example request

bash
curl -X DELETE "https://console.brevily.com/api/NORTHWIND/links/01JC6Y8QH2M4ZK7T9VRW3XNB5D" \  -H "x-api-key: brv_ak_7Fq2Lw9xK3" \  -H "x-api-secret: $BREVILY_SECRET" \  -H "Idempotency-Key: 4f9c1e2a-autumn"

Example answer

json
{  "id": "01JC6Y8QH2M4ZK7T9VRW3XNB5D",  "domain": "go.example.com",  "slug": "example",  "path": "example",  "shortUrl": "https://www.example.com/sale/autumn",  "folder": "example",  "move": {    "edits": 1,    "fields": [      "utm"    ]  },  "inherited": [    "utm"  ],  "title": "example",  "note": "example",  "destination": "https://www.example.com/sale/autumn",  "opens": "https://www.example.com/sale/autumn",  "status": "ACTIVE",  "state": "ACTIVE",  "slugChosen": false,  "tags": [    {      "name": "example",      "kind": "PERSON"    }  ],  "utm": {    "source": "example",    "medium": "example",    "campaign": "example",    "term": "example",    "content": "example"  },  "passMode": "FOLLOW",  "passClickIds": false,  "passNames": [    "example"  ],  "ogTitle": "example",  "ogDescription": "example",  "ogImage": "example",  "liveOn": "2026-11-05T09:41:00Z",  "expiresOn": "2026-11-05T09:41:00Z",  "endedOn": "2026-11-05T09:41:00Z",  "trashedOn": "2026-11-05T09:41:00Z",  "maxClicks": 1,  "clicks": 1,  "hasPassword": false,  "masked": false,  "trackConversions": false,  "publicStats": false,  "qrStyled": false,  "health": "UNKNOWN",  "healthReason": "example",  "flagged": false,  "threat": "example",  "reviewRequestedOn": "2026-11-05T09:41:00Z",  "createdBy": "example",  "createdOn": "2026-11-05T09:41:00Z",  "updatedOn": "2026-11-05T09:41:00Z"}

Made-up values. Send your own Idempotency-Key, one per change.

Path parameters
NameTypeRequiredDescriptionAllowed values
ORGstringrequiredYour organisation’s code.3 to 20 characters
linkstringrequired—

Link

Answer fields
NameTypeDescriptionAllowed values
idstringThe link’s id.—
domainstringThe short domain.—
slugstringThe back-half after the domain, with its path when it has one (promo/autumn).—
pathstringThe path in front of the back-half, lower case; null for a bare name.or null
shortUrlstringThe whole short link.—
folderstringThe code of the folder the link lives in.—
moveLinkMoveOnly on a move’s dry run (PATCH with folder and dryRun: true): what the move would change; nothing was written.—
inheritedstring[]The folder’s preset fields the link still follows: a change to the folder’s preset reaches them. Setting a field on the link takes it out; PATCH with inherit: [...] puts it back.utm, params, domain, app, qr, tags, pixels
titlestringIts name, shown above the back-half and found by the list’s search; null for none.or null
notestringA note for the organisation (at most 2000 characters), never shown to visitors and not searched; null for none.or null
destinationstringWhere it sends visitors.—
opensstringThe destination with the link’s UTM tags added: where a visitor lands.—
statusstringThe stored status; DELETED only in a delete’s answer.ACTIVE, DISABLED, EXPIRED, DELETED
statestringWhat a visitor meets now: ACTIVE, SCHEDULED (not live yet), EXPIRED, DISABLED.ACTIVE, SCHEDULED, EXPIRED, DISABLED, DELETED
slugChosenbooleanThe back-half was chosen; false when generated.—
tagsTag[]The link’s tags.—
utmUtmThe UTM tags the redirect adds to the destination; only those set.—
passModestringWhich of the visit’s own parameters pass on beside utm_ ones: FOLLOW its folder’s preset, then its own domain’s default; PASS the ones passClickIds and passNames name; NONE, whatever the domain passes (for a destination that breaks on extra parameters). Left out of a create: PASS when passClickIds or passNames is sent, else the folder’s.FOLLOW, PASS, NONE
passClickIdsbooleanWith PASS: the ad networks’ click ids (gclid, fbclid, msclkid and the rest) pass from the visit into the destination.—
passNamesstring[]Other names of the visit’s parameters that pass on beside utm_ ones (ref, for one). Never a redirect’s, such as next, url or redirect_uri: those are refused.—
ogTitlestringThe preview title unfurlers show; null for none.or null
ogDescriptionstringThe preview description; null for none.or null
ogImagestringThe preview image’s address; null for none.or null
liveOndate-timeWhen it starts answering.—
expiresOndate-timeWhen it expires; null for never.or null
endedOndate-timeWhen it expired or was deleted; null while it has not.or null
trashedOndate-timeWhen it went to the trash (a deleted link that can still be restored, POST /links/<link>/restore); null otherwise.or null
maxClicksintegerThe click budget; null for none.or null
clicksintegerHuman clicks counted so far (crawlers are counted apart).—
hasPasswordbooleanVisitors must give a password first.—
maskedbooleanThe destination is shown under the short link (own domains only).—
trackConversionsbooleanVisitors carry brv_click to the destination.—
publicStatsbooleanIts public stats page is on.—
qrStyledbooleanIts QR code has a saved style.—
healthstringWhether the destination answers, as the landing probe last found it.UNKNOWN, HEALTHY, BROKEN
healthReasonstringWhy it is broken ("Not found (404)"); else null.or null
flaggedbooleanA reviewer or the safety check flagged the destination.—
threatstringWhat it was flagged for; null when it is not.or null
reviewRequestedOndate-timeWhen a review of the flag was asked for; null when none was.or null
createdBystringWho made it, by name ("Support" for Brevily’s support team); null when the account is gone.or null
createdOndate-timeWhen it was made.—
updatedOndate-timeWhen it last changed; null when it never has.or null
Fields of move
Fields of move
NameTypeDescriptionAllowed values
editsintegerThe link edits the move uses: 1 when any field changes, else 0.—
fieldsstring[]The fields whose values the move changes.utm, params, domain, app, qr, tags, pixels
Fields of tags
Fields of tags
NameTypeDescriptionAllowed values
namestringThe tag as typed.—
kindstringWhat the tag names; a bare name is CUSTOM.PERSON, TEAM, CAMPAIGN, CHANNEL, PRODUCT, REGION, CUSTOM
Fields of utm
Fields of utm
NameTypeDescriptionAllowed values
sourcestringutm_source, added to the destination.—
mediumstringutm_medium, added to the destination.—
campaignstringutm_campaign, added to the destination.—
termstringutm_term, added to the destination.—
contentstringutm_content, added to the destination.—
Errors
Status Code When
400 VALIDATION_FAILED A field, a parameter or the body is wrong; details.fields says which.
400 IDEMPOTENCY_KEY_INVALID The Idempotency-Key is longer than 255 characters.
401 UNAUTHENTICATED No key, a key that does not match, or one expired or revoked.
403 ACCESS_DENIED The key lacks Links · delete, or the organisation’s plan does not include it.
404 NOT_FOUND No organisation with that code for this key, or no such record in it.
409 CONFLICT
409 IDEMPOTENCY_IN_FLIGHT The first call with this Idempotency-Key is still running.
413 PAYLOAD_TOO_LARGE
415 UNSUPPORTED_MEDIA
422 IDEMPOTENCY_MISMATCH The same Idempotency-Key was sent with a different request.
429 RATE_LIMITED Too many calls: wait Retry-After seconds.

Counted with every other call of the organisation, by plan: Pricing. The answer carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset; more on rate limits.