Add or remove a label
Add a label to members, or remove it from them.
POST https://cotlet.dev/api/v1/ghost/members/label
write
Returns how many members were changed and how many already had the state you asked for. Labels are internal and no member sees them, and a second call with the other action undoes the first, so this tool does not ask for confirmation. Members are updated one by one, and the response lists any that failed.
Parameters
| Name | Type | Description |
|---|---|---|
| action string required | string | add or remove. |
| label string required | string | Label name. With add, a label that does not exist yet is created. |
| member_ids string[] required | string[] | Member IDs from list_members. |
Request
curl -X POST https://cotlet.dev/api/v1/ghost/members/label \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"action":"add","label":"Launch signup","member_ids":["6710b2d4a1b2c300a1b2c3e1","6710b2d4a1b2c300a1b2c3e2","6710b2d4a1b2c300a1b2c3e3"]}' result = client.call("ghost", "label_members", {"action":"add","label":"Launch signup","member_ids":["6710b2d4a1b2c300a1b2c3e1","6710b2d4a1b2c300a1b2c3e2","6710b2d4a1b2c300a1b2c3e3"]}) const result = await cotlet.call('ghost', 'label_members', {"action":"add","label":"Launch signup","member_ids":["6710b2d4a1b2c300a1b2c3e1","6710b2d4a1b2c300a1b2c3e2","6710b2d4a1b2c300a1b2c3e3"]}); cotlet call ghost label_members --data '{"action":"add","label":"Launch signup","member_ids":["6710b2d4a1b2c300a1b2c3e1","6710b2d4a1b2c300a1b2c3e2","6710b2d4a1b2c300a1b2c3e3"]}' Example response
{
"label": "Launch signup",
"action": "add",
"updated": 3,
"skipped": 0,
"failed": []
}