# bulk_update_subscribers

Change tags and lists on up to 1,000 subscribers

`POST /v1/subscribers/bulk-update`

| | |
| --- | --- |
| 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:

```bash
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"
  ]
}'
```

Response: `200`:

```json
{
  "results": [
    {
      "index": 0,
      "status": "updated",
      "subscriber_id": "sub_0123456789abcdefghjkmnpq"
    }
  ],
  "counts": {
    "updated": 1
  }
}
```

## Errors

| Status | Codes |
| --- | --- |
| 400 | [`validation_failed`](/developers/md/errors/validation_failed), [`idempotency_key_required`](/developers/md/errors/idempotency_key_required) |
| 401 | [`unauthenticated`](/developers/md/errors/unauthenticated), [`credential_revoked`](/developers/md/errors/credential_revoked), [`credential_expired`](/developers/md/errors/credential_expired) |
| 403 | [`insufficient_scope`](/developers/md/errors/insufficient_scope), [`plan_does_not_include`](/developers/md/errors/plan_does_not_include), [`workspace_paused`](/developers/md/errors/workspace_paused), [`api_suspended`](/developers/md/errors/api_suspended), [`consent_required`](/developers/md/errors/consent_required) |
| 409 | [`conflict`](/developers/md/errors/conflict), [`idempotency_key_reused`](/developers/md/errors/idempotency_key_reused), [`request_in_progress`](/developers/md/errors/request_in_progress) |
| 413 | [`payload_too_large`](/developers/md/errors/payload_too_large) |
| 415 | [`unsupported_media_type`](/developers/md/errors/unsupported_media_type) |
| 429 | [`rate_limited`](/developers/md/errors/rate_limited), [`quota_exceeded`](/developers/md/errors/quota_exceeded) |
| 503 | [`service_unavailable`](/developers/md/errors/service_unavailable) |

Every error is an `application/problem+json` body with a `code`, a `fix` sentence and `next_actions`. See [reading a problem response](/developers/md/guides/agents#reading-a-problem-response).

## Typical next steps

- [`get_operation`](/developers/md/operations/get_operation)
- [`estimate_audience`](/developers/md/operations/estimate_audience)

## Related

- [OpenAPI document](https://api.seemly.com/v1/openapi.json)
- [Agent guide](/developers/md/guides/agents)
