Docs
Email Accounts

Assign or unassign tags in bulk

Assign and/or unassign tags across multiple accounts

One route covers both directions: addTags are applied to every selected account (created on demand if the tag name is new), removeTags are stripped from every selected account. Both are optional - send either, or both in the same call. Tags are addressed by NAME, not id. Ids outside the caller workspace are filtered out before anything is applied, so accounts in the response can be lower than the number of ids sent.

POST
/v2/workspaces/{workspaceId}/accounts/bulk/tags

Path Parameters

workspaceIdnumber
idsarray<number>

Account IDs to act on. Max 200 per request.

addTags?array<string>

Tag names to add to every selected account (created on demand).

removeTags?array<string>

Tag names to remove from every selected account.

Response Body

curl -X POST "https://lynx-api.trulyinbox.com/v2/workspaces/0/accounts/bulk/tags" \  -H "Content-Type: application/json" \  -d '{    "ids": [      1,      2,      3    ],    "addTags": [      "Sales"    ],    "removeTags": [      "Old Campaign"    ]  }'
{
  "data": {
    "added": 0,
    "removed": 0,
    "accounts": 0
  },
  "meta": {
    "request_id": "req_2f1c…",
    "timestamp": "2019-08-24T14:15:22Z"
  }
}
{
  "error": {
    "code": "invalid_request",
    "message": "string",
    "details": {},
    "retry_after": 34
  },
  "meta": {
    "request_id": "req_2f1c…",
    "timestamp": "2019-08-24T14:15:22Z"
  }
}
{
  "error": {
    "code": "invalid_request",
    "message": "string",
    "details": {},
    "retry_after": 34
  },
  "meta": {
    "request_id": "req_2f1c…",
    "timestamp": "2019-08-24T14:15:22Z"
  }
}