Change tags and lists on up to 1,000 subscribers
On this page
POST
/v1/subscribers/bulk-updatebulk_update_subscribers| Risk | bulk |
| Authentication | API key or OAuth access token |
| Scopes | subscribers:write, tags:write |
| Idempotency | required: send an Idempotency-Key header |
| Dry run | yes: add dry_run=true to the query |
| Success status | 200 |
| Response type | application/json |
What it does#
- Use when: You tag or list many readers at once by subscriber id.
- Do not use when: you change status or consent (those never change in bulk) or one reader (call add_subscriber_tags).
- Side effects: Adds or removes tags and list memberships; Over 100 items becomes an async operation.
- Reversible: Yes, run the opposite add or remove.
- Required scope: subscribers:write, tags:write.
- Idempotency: required (Idempotency-Key header).
- Typical next step: call get_operation if the answer was 202.
Scopes#
subscribers:write: Add subscribers with double opt-in, update them, unsubscribe them, and change their lists and tags.tags:write: Add and remove tags on subscribers.
Side effects#
- Adds or removes tags and list memberships
- Over 100 items becomes an async operation
Request#
Path parameters#
None.
Query parameters#
None.
Every mutation also accepts dry_run=true: it runs every check and returns {"dry_run": true, "would": {...}} without writing anything.
Body (application/json)#
| Field | Type | Required | Description |
|---|---|---|---|
subscriber_ids | array of string, max 1000 items | yes | |
add_tags | array of string, max 50 characters, max 20 items | no | |
remove_tags | array of string, max 50 characters, max 20 items | no | |
add_lists | array of string, max 100 characters, max 50 items | no | |
remove_lists | array of string, max 50 items | no |
Response#
| Field | Type | Required | Description |
|---|---|---|---|
results | array of object | yes | |
results[].index | integer, min -9007199254740991, max 9007199254740991 | yes | Position of the item in the request |
results[].status | one of "added_pending", "confirmation_resent", "added_confirmed", "updated", "unchanged", "already_subscribed", "already_pending", "cannot_resubscribe", "invalid", "plan_limit", "daily_limit", "unavailable", "not_found", "unknown", "canceled" | yes | |
results[].email | string | no | |
results[].subscriber_id | string | no | |
results[].code | string | no | |
results[].message | string | no | |
counts | object | yes |
Examples#
tag two#
Request:
curl -X POST 'https://api.seemly.com/v1/subscribers/bulk-update' \
-H "Authorization: Bearer $SEEMLY_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"subscriber_ids": [
"sub_0123456789abcdefghjkmnpq"
],
"add_tags": [
"vip"
]
}'const response = await fetch("https://api.seemly.com/v1/subscribers/bulk-update", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.SEEMLY_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"subscriber_ids": [
"sub_0123456789abcdefghjkmnpq"
],
"add_tags": [
"vip"
]
}),
});
const result = await response.json();
console.log(response.status, result);import os
import uuid
import requests
response = requests.post(
"https://api.seemly.com/v1/subscribers/bulk-update",
headers={
"Authorization": f"Bearer {os.environ['SEEMLY_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"subscriber_ids": [
"sub_0123456789abcdefghjkmnpq",
],
"add_tags": [
"vip",
],
},
)
print(response.status_code, response.json())Response: 200:
{
"results": [
{
"index": 0,
"status": "updated",
"subscriber_id": "sub_0123456789abcdefghjkmnpq"
}
],
"counts": {
"updated": 1
}
}Errors#
Every error is an application/problem+json body with a code, a fix sentence and next_actions. See reading a problem response.