Deleting a script

A script can be deleted from your collection by sending a DELETE request to its API URL: https://api.rebrandly.com/v1/scripts/:id, where :id is the unique identifier of the script.
The action is not reversible and will permanently delete your script, detaching it from all links you have attached it to.

PATH Parameters

Parameter nameDescription
idUnique identifier of the script you want to permanently delete

Permanently deleting a single tag

$ curl 'https://api.rebrandly.com/v1/scripts/fffa4cc5b6ee45d6g7897b06ac2d16af' \
-X DELETE \
-H 'Authorization: Bearer YOUR_TOKEN_HERE'

When a script is deleted, its last object representation is returned (prior to deletion).

{
  "id": "fffa4cc5b6ee45d6g7897b06ac2d16af",
  "name": "Test Alert",
  "color": "<script>alert('test');</script>"
}

Handling errors

HTTP StatusError typeDescription
404404 - Not foundGiven id does not correspond to any existing script

Did this page help you?
// Bulk plan CTA banner: requested by Alison to promote the high-volume pricing plan. Injected in Footer HTML per ReadMe convention, but renderd at the top of the viewport via the fixed-position CSS above.
Sending 250K+ links a year? You qualify for a better rate. See high-volume pricing