Add or remove tags
Add tags to an article by name, or remove them by ID.
POST https://cotlet.dev/api/v1/instapaper/bookmarks/{bookmark_id}/tag
write
Adds the tag names you pass, creating any that do not exist, and removes the tag IDs you pass. Removals run before additions. Returns the full tag list of the article afterwards and the tags this call created. Reaches no one and is undone with another call, so it runs without asking.
Parameters
| Name | Type | Description |
|---|---|---|
| bookmark_id integer required | integer | Bookmark ID from list_bookmarks. |
| add_tags string[] | string[] | Tag names to add. |
| remove_tag_ids integer[] | integer[] | Tag IDs to remove, from list_tags. |
Request
curl -X POST https://cotlet.dev/api/v1/instapaper/bookmarks/1893240551/tag \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"add_tags":["Cooking","Weeknight"]}' result = client.call("instapaper", "tag_bookmark", {"bookmark_id":1893240551,"add_tags":["Cooking","Weeknight"]}) const result = await cotlet.call('instapaper', 'tag_bookmark', {"bookmark_id":1893240551,"add_tags":["Cooking","Weeknight"]}); cotlet call instapaper tag_bookmark --data '{"bookmark_id":1893240551,"add_tags":["Cooking","Weeknight"]}' Example response
{
"bookmark_id": 1893240551,
"created_tags": [
{
"tag_id": 31,
"name": "Weeknight"
}
],
"tags": [
{
"tag_id": 7,
"name": "Cooking"
},
{
"tag_id": 31,
"name": "Weeknight"
}
]
}