Skip to content
A CodeIgniter wrapper library for SendGrid's Newsletter API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


CodeIgniter-SendGrid-Newsletter is a CodeIgniter wrapper for the SendGrid Newsletter API.


  1. PHP 5.1+
  2. CodeIgniter 2.0.0+
  3. cURL
  4. CodeIgniter REST Client Library:

Included Methods


  1. initialize() - Set up the library with API credentials and settings


  1. add_newsletter() - Create a newsletter
  2. edit_newsletter() - Edit a newsletter
  3. get_newsletter() - Get the contents of an existing newsletter
  4. list_newsletters() - Retrieve a list of all newsletters
  5. delete_newsletter() - Delete a newsletter


  1. add_list() - Create a recipient list
  2. edit_list() - Rename a list
  3. get_lists() - Retrieve all recipient lists or check if a particular list exists
  4. delete_list() - Delete a list

List Emails

  1. add_list_emails() - Add one or more emails to a list
  2. get_list_emails() - Retrieve the email addresses and associated fields for a particular list
  3. delete_list_emails() - Remove one or more emails from a list

Newsletter Lists

  1. add_recipients() - Add a recipient to a newsletter
  2. get_recipients() - Retrieve the lists assigned to a particular newsletter
  3. delete_recipients() - Remove a list from a newsletter


  1. add_schedule() - Schedule a delivery time for an existing newsletter
  2. get_schedule() - Retrieve the scheduled delivery time for a particular newsletter
  3. delete_schedule() - Cancel a scheduled send for a newsletter


  1. add_identity() - Create a new identity
  2. edit_identity() - Edit an identity
  3. get_identity() - Retrieve a particular identity
  4. list_identities() - Retrieve a list of all identities or check if an identity exists
  5. delete_identity() - Delete an identity


  1. error_message() - Get error message


// Load the SendGrid spark

// Initialize (not necessary if set in config)
$this->sendgrid_newsletter->initialize(array('api_user'   => 'my_username',
                                			 'api_key'    => 'secret_key',
                                			 'api_format' => 'json'));

// Get newsletters
$newsletters = $this->sendgrid_newsletter->list_newsletters();
You can’t perform that action at this time.