Subscribers

Create or upsert a subscriber

Creates a new subscriber when the email does not exist in the workspace. If the email already exists, the API updates the existing subscriber unless create_only is true.

post/v1/subscribers

Request

  • Base URL: https://api.mailrith.com
  • URL: https://api.mailrith.com/v1/subscribers
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Optional idempotency key to retry the request safely. It must not exceed 256 UTF-8 bytes.

Request body

emailstring email required
namestring
status'Active' | 'Unconfirmed' | 'Unsubscribed' | 'Complained' | 'Bounced' | 'Blocked'
countrystring nullable

Two-letter country code or country name. Mailrith stores Subscriber country as a two-letter country code.

subscribed_onstring

Subscriber-local subscription date in YYYY-MM-DD format.

create_onlyboolean

When true, Mailrith returns a 409 conflict instead of updating an existing subscriber with the same email.

custom_fieldsobject

Custom field values keyed by custom field ID. For Multi Select fields, send an array of option names or a comma-separated string. Blank optional values leave saved values unchanged when updating an existing subscriber, and filled-in invalid values are rejected.

Example request

{
  "email": "ada@example.com",
  "name": "Ada Lovelace",
  "status": "Unconfirmed",
  "country": "DE",
  "custom_fields": {
    "cf_company": "Analytical Engines"
  }
}

Response

Existing subscriber was updated

Changes

No recorded changes to this operation across all 1 revision of this API.