API - Create Subscriber

Eric535

Member
Im using the API - Create Subscriber call below. How do i add a subscriber without sending a confirmation email and how do I set its status to Confirmed using the call below?

"""
ADD SUBSCRIBER
"""
response = endpoint.create(list_uid='LIST-UNIQUE-ID', data={
'EMAIL': 'john.doe@example.com', # the confirmation email will be sent!!! Use valid email address
'FNAME': 'John',
'LNAME': 'Doe'
})

"""
DISPLAY RESPONSE
"""
print(response.content)
 
Im using the API - Create Subscriber call below. How do i add a subscriber without sending a confirmation email
If you need to add subscriber without email confirmation, then need to update Opt in in your list: Customer > Lists > Select your list > Update > Opt in > Single-opt-in.

and how do I set its status to Confirmed using the call below?
add status confirmed:

PHP:
response = endpoint.create(list_uid='LIST-UNIQUE-ID', data={
'EMAIL': 'john.doe@example.com', # the confirmation email will be sent!!! Use valid email address
'FNAME': 'John',
'LNAME': 'Doe',
'details'  => [
        'status'   => 'unconfirmed', // add here your status
    ],
})
 
If you need to add subscriber without email confirmation, then need to update Opt in in your list: Customer > Lists > Select your list > Update > Opt in > Single-opt-in.


add status confirmed:

PHP:
response = endpoint.create(list_uid='LIST-UNIQUE-ID', data={
'EMAIL': 'john.doe@example.com', # the confirmation email will be sent!!! Use valid email address
'FNAME': 'John',
'LNAME': 'Doe',
'details'  => [
        'status'   => 'unconfirmed', // add here your status
    ],
})

Thank you. Had to tweak a bit for python but it worked perfect :)
 
Back
Top