Detaching a tag
You can detach a Tag object from a Link object.
When you delete a Tag, it is detached from all the branded links it was attached to.
In order to detach a Tag from a Link, you must first get both unique identifiers for the Link and the Tag. Once you have them, you can perform a DELETE
API call (without body) to the association endpoint, which is composed as follow:
https://api.rebrandly.com/v1/links/:lid/tags/:tid
, where lid
is the Link resource's id
property and tid
is the Tag resource's id
property.
Path parameters
Path parameter | Description |
---|---|
lid | Unique identifier of the branded short link you want the tag to be attached to |
tid | Unique identifier of the tag you want to attach to this link |
Detaching a Tag to a Link
$ curl 'https://api.rebrandly.com/v1/links/FFfa4cc5b6ee45d6g7897b06ac2d16af/tags/3aehje9d536s46d59ba5bcf49b582ear' \
-X DELETE \
-H 'apikey: YOUR_API_KEY' \
-H 'Content-Type: application/json'
HTTP/1.1 200 OK
Handling errors
HTTP status | Error type | Description |
---|---|---|
404 | 404 - Not found with property value "link.id" | Given path parameter lid does not correspond to any existing link |
404 | 404 - Not found with property value "tag.id" | Given path parameter tid does not correspond to any existing tag |
Updated 7 months ago