POST
/
partner
/
subscribers
curl https://api.thanx.com/partner/subscribers/ \
  -X POST \
  $HEADERS \
  -d '{
    "merchant_id": "owierywtwt",
    "subscriber": {
      "email": "jane.smith@example.com",
      "first_name": "Jane",
      "last_name":  "Smith",
      "birth_date": {
        "month": 8,
        "day": 14
      },
      "zip_code": "12345"
    }
  }'
{
  "subscriber": {
    "email": "jane.smith@example.com"
  }
}
Scope required: subscribers.write
This endpoint opts an email address into the specified merchant’s loyalty marketing. This will enable merchants to send targeted marketing to these subscribers in order to encourage loyalty opt-in. It is expected that all user information provided to Thanx via API must have gotten explicit user consent to participate in the merchant’s marketing. For integrations intending to sign up a user directly for a merchant’s loyalty program should be integrating with the Consumer APIs. This integration is more intensive, as it requires strict compliance with the legal requirements for user creation and must include a complete enrollment flow (prompt users for card linkage, display introductory incentives). Please reach out to our team at integrations@thanx.com if you are interested in this type of integration instead. This endpoint only requires merchant_id and email to be specified, but accepts additional subscriber information. This endpoint responds with a 201 for any valid email address that is sent, even if the email address is already captured in the system. To avoid unintentional PII exposure for existing records in the system, this API responds only with accepted email address. The only time this endpoint 400s is when the input email address is invalid.

Body

merchant_id
string
required
Filter by Merchant ID
email
string
required
The subscriber’s email
first_name
string
The subscriber’s first name
last_name
string
The subscriber’s last name
birth_date
hash
The subscriber’s birthday information
zip_code
string
The subscriber’s zip code
curl https://api.thanx.com/partner/subscribers/ \
  -X POST \
  $HEADERS \
  -d '{
    "merchant_id": "owierywtwt",
    "subscriber": {
      "email": "jane.smith@example.com",
      "first_name": "Jane",
      "last_name":  "Smith",
      "birth_date": {
        "month": 8,
        "day": 14
      },
      "zip_code": "12345"
    }
  }'

Response

subscriber
Subscriber
The newly created subscriber
{
  "subscriber": {
    "email": "jane.smith@example.com"
  }
}