SenderWiz API
HomepagePricingContact UsLoginSignup
  • Introduction
  • API URL and Key
  • Customer
    • Contact List
      • Get All Lists
      • Get One List
      • Create a List
      • Update a List
      • Copy a List
      • Delete a List
    • Fields
      • Get All List Fields
      • Get One List Field
      • Create a List Field
      • Update a List Field
      • Delete a List Field
      • Get All List Field Types
    • Segments
      • Get All List Segments
      • Get One List Segment
      • Get All Subscribers
      • Create a List Segment
      • Update a List Segment
      • Delete a List Segment
      • Get All List Segment Condition Operators
    • Subscribers
      • Get All Subscribers
      • Get One Subscriber
      • Search Subscriber by Email
      • Search by Email in All Lists
      • Search by Custom Fields in a List
      • Search Subscribers by Status
      • Get Blacklisted Subscribers
      • Get Confirmed Subscribers
      • Get Unconfirmed Subscribers
      • Get Unsubscribed Subscribers
      • Create a Subscriber
      • Create Subscribers in Bulk
      • Update a Subscriber
      • Update a Subscriber by Email
      • Create or Update a Subscriber
      • Unsubscribe a Subscriber
      • Unsubscribe a Subscriber by Email
      • Unsubscribe Subscriber from All Lists
      • Delete One Subscriber
      • Delete Subscriber by Email
    • Campaigns
      • Get All Campaigns
      • Get One Campaign
      • Create a Campaign
      • Update a Campaign
      • Copy a Campaign
      • Pause/Unpause a Campaig
      • Mark a Campaign as SENT
      • Delete a Campaign
      • Get Stats of a Campaign
    • Reports
      • Track Subscriber Click for Campaign
      • Track Subscriber Open
      • Track Subscriber Unsubscribe
    • Bounces
      • Get All Bounces
      • Create a Campaign Bounce
    • Countries
      • Get All Countries
      • Get All Zones of a Country
    • Templates
      • Get All Templates
      • Get One Template
      • Search Templates
      • Create a Template
      • Update a Template
      • Delete a Template
    • Subaccounts
      • Get All Subaccounts
      • Create a Subaccount
      • Update a Subaccount
      • Delete a Subaccount
      • Get Subaccount Permissions
      • Update Subaccount Permissions
    • Transactional Emails
      • Get All Transactional Emails
      • Get One Transactional Email
      • Create a Transactional Email
      • Delete a Transactional Email
  • Admin
    • Customer
      • Get All Customers
      • Get One Customer
      • Create a Customer
      • Update a Customer
      • Delete a Customer
      • Get All Customer Groups
      • Get All Timezones
    • Customer Login via Token
    • Customer Task via Admin API
Powered by GitBook
On this page
  1. Customer
  2. Contact List

Create a List

Create a new subscriber list by submitting general details, optional sender defaults, notification preferences information. Required fields must be included for a successful request.

➕ Create a List

Create a new subscriber list under your SenderWiz account.

🔹 HTTP Request

POST API-URL/lists

🔸 Authorization Header

Include your customer API key:

X-API-KEY: your-api-key-here

📝 POST Parameters

Parameter
Type
Required
Description

data

array

Yes

Array containing list details. Accepts general, defaults, and notifications blocks.


📦 general Block (Required)

Parameter
Type
Required
Description

name

string

Yes

Name of the list.

description

string

No

List description


📦 defaults Block (Optional)

Parameter
Type
Required
Description

from_name

string

Yes

Sender's name.

from_email

string

Yes

Sender's email address.

reply_to

string

Yes

Reply-to email address.

subject

string

No

Default subject line.


📦 notifications Block (Optional)

Parameter
Type
Required
Description

subscribe

Yes/No

No

Notify on new subscriber (yes or no).

unsubscribe

Yes/No

No

Notify on unsubscribe (yes or no).

subscribe_to

string

No

Email address to receive subscribe notifications.

unsubscribe_to

string

No

Email address to receive unsubscribe notifications.


💻 PHP Example

// create a new list
$response = $endpoint->create([
    // required
    'general' => [
        'name'          => 'API Test List', // required
        'description'   => 'This is a test list, created from the API.', // optional
    ],
    // optional
    'defaults' => [
        'from_name' => 'Emily Carter', // required
        'from_email'=> 'emily.carter@example.org', // required
        'reply_to'  => 'emily.carter@example.org', // required
        'subject'   => 'Welcome to Our Newsletter!', // required
    ],
    // optional
    'notifications' => [
        // notification when new subscriber added
        'subscribe'         => 'yes', // yes|no
        // notification when subscriber unsubscribes
        'unsubscribe'       => 'yes', // yes|no
        // where to send the notifications.
        'subscribe_to'      => 'emily.carter@example.org',
        'unsubscribe_to'    => 'emily.carter@example.org',
    ],
]);

// and get the response
echo '<pre>';
print_r($response->body);
echo '</pre>';

📦 Sample JSON Response

{
  "status": "success",
  "list_uid": "lm451q7h7j3e2"
}

PreviousGet One ListNextUpdate a List

Last updated 1 month ago