Skip to content

Add or update up to 1,000 subscribers

On this page
POST/v1/subscribers/bulkbulk_upsert_subscribers
Riskbulk
AuthenticationAPI key or OAuth access token
Scopessubscribers:write
Idempotencyrequired: send an Idempotency-Key header
Dry runyes: add dry_run=true to the query
Success status200
Response typeapplication/json

What it does#

  • Use when: You send a batch of readers; each item is an upsert_subscriber body.
  • Do not use when: you add one reader (call upsert_subscriber) or import a purchased list (not accepted).
  • Side effects: Creates subscribers; Queues confirmation emails; Over 100 items becomes an async operation.
  • Reversible: Yes, call unsubscribe_subscriber per reader.
  • Required scope: subscribers: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.

Side effects#

  • Creates subscribers
  • Queues confirmation emails
  • 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)#

FieldTypeRequiredDescription
itemsarray of any, max 1000 itemsyes

Response#

FieldTypeRequiredDescription
resultsarray of objectyes
results[].indexinteger, min -9007199254740991, max 9007199254740991yesPosition of the item in the request
results[].statusone 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[].emailstringno
results[].subscriber_idstringno
results[].codestringno
results[].messagestringno
countsobjectyes

Examples#

one item#

Request:

curl -X POST 'https://api.seemly.com/v1/subscribers/bulk' \
  -H "Authorization: Bearer $SEEMLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "items": [
    {
      "email": "[email protected]",
      "tags": [
        "launch"
      ]
    }
  ]
}'

Response: 200:

JSON
{
  "results": [
    {
      "index": 0,
      "status": "added_pending",
      "email": "[email protected]",
      "subscriber_id": "sub_0123456789abcdefghjkmnpq",
      "message": "Added."
    }
  ],
  "counts": {
    "added_pending": 1
  }
}

Errors#

Every error is an application/problem+json body with a code, a fix sentence and next_actions. See reading a problem response.

Typical next steps#

View this page as MarkdownReport a problem with this page

Type to search. Try a method and path, an operation name or an error code.