curl https://api.thanxsandbox.com/partner/subscribers/ \
-X POST \
-H 'X-ClientId: {client_id}' \
-H 'Accept-Version: v4.0' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access_token}' \
-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"
}
}
{
"error": {
"code": "BAD_REQUEST",
"message": "Email does not appear to be valid"
}
}
Subscribers
Create Subscriber
POST
/
partner
/
subscribers
curl https://api.thanxsandbox.com/partner/subscribers/ \
-X POST \
-H 'X-ClientId: {client_id}' \
-H 'Accept-Version: v4.0' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access_token}' \
-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"
}
}
{
"error": {
"code": "BAD_REQUEST",
"message": "Email does not appear to be valid"
}
}
Scope required:
subscribers.writemerchant_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
string
required
Filter by Merchant ID
string
required
The subscriber’s email
string
The subscriber’s first name
string
The subscriber’s last name
hash
string
The subscriber’s zip code
curl https://api.thanxsandbox.com/partner/subscribers/ \
-X POST \
-H 'X-ClientId: {client_id}' \
-H 'Accept-Version: v4.0' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access_token}' \
-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": {
"email": "jane.smith@example.com"
}
}
{
"error": {
"code": "BAD_REQUEST",
"message": "Email does not appear to be valid"
}
}