{"id":2041,"date":"2017-03-20T19:27:33","date_gmt":"2017-03-20T14:27:33","guid":{"rendered":"https:\/\/ahmadawais.com\/?p=2041"},"modified":"2023-08-16T05:47:17","modified_gmt":"2023-08-16T12:47:17","slug":"sendy-php-api-wrapper","status":"publish","type":"post","link":"https:\/\/ahmadawais.com\/sendy-php-api-wrapper\/","title":{"rendered":"Open Sourcing My Sendy PHP API Wrapper"},"content":{"rendered":"<p>I recently started using <a href=\"https:\/\/awais.dev\/sendy\">Sendy.co<\/a> (aff) to send emails. I was having trouble finding a good API wrapper for it. Spent more than five hours searching for one and ended up building one myself. I hope it helps.<\/p>\n<blockquote>\n<h2 style=\"text-align: left;\" style=\"text-align: left;\" id=\"%f0%9f%9a%80-github-%e2%98%85-86-%e2%91%82-21-%e2%86%92\"><a href=\"https:\/\/github.com\/ahmadawais\/Sendy-PHP-API\">\ud83d\ude80 GITHUB: \u2605 86 \u2442 21 \u2192<\/a><a href=\"#%f0%9f%9a%80-github-%e2%98%85-86-%e2%91%82-21-%e2%86%92\" class=\"heading-link\">#<\/a><\/h2>\n<\/blockquote>\n<div align=\"center\">\n<p><img decoding=\"async\" align=\"center\" src=\"https:\/\/i.imgur.com\/FylVZzy.png\" \/><\/p>\n<p>\ud83d\ude80 Sendy PHP API Wrapper: Complete API interfacing.<\/p>\n<p>[![emoji-log](https:\/\/cdn.rawgit.com\/ahmadawais\/stuff\/ca97874\/emoji-log\/flat-round.svg)](https:\/\/github.com\/ahmadawais\/Emoji-Log\/)<\/p>\n<\/div>\n<h2 id=\"%f0%9f%93%a8-sendy-api\">\ud83d\udce8 SENDY API<a href=\"#%f0%9f%93%a8-sendy-api\" class=\"heading-link\">#<\/a><\/h2>\n<p>With this <code>Sendy PHP API Wrapper<\/code> you can do the following:<\/p>\n<table>\n<thead>\n<tr>\n<th><strong>SUBSCRIBERS<\/strong><\/th>\n<th><strong>LISTS<\/strong><\/th>\n<th><strong>CAMPAIGNS<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Subscribe<\/td>\n<td>Set List<\/td>\n<td>Create<\/td>\n<\/tr>\n<tr>\n<td>Unsubscribe<\/td>\n<td>Get List<\/td>\n<td>Draft<\/td>\n<\/tr>\n<tr>\n<td>Delete subscriber<\/td>\n<td>Active subscriber count<\/td>\n<td>Send<\/td>\n<\/tr>\n<tr>\n<td>Subscription status<\/td>\n<td>List Segments handling<\/td>\n<td>Assign to brands<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"getting-started\">Getting Started<a href=\"#getting-started\" class=\"heading-link\">#<\/a><\/h2>\n<p>Getting started is easy. Here&#8217;s how you do it. You can check the example.php file as well. Obviously, you&#8217;ll have to download the wrapper to your current setup. Several ways to do that.<\/p>\n<h3 id=\"1-manual-install\"><strong>#1<\/strong> MANUAL INSTALL:<a href=\"#1-manual-install\" class=\"heading-link\">#<\/a><\/h3>\n<p>Git clone this repo and include <code>.\/src\/Sendy.php<\/code> in your project.<\/p>\n<h3 id=\"2-composer-install\"><strong>#2<\/strong> COMPOSER INSTALL:<a href=\"#2-composer-install\" class=\"heading-link\">#<\/a><\/h3>\n<p>Composer Install is the preferred method.<\/p>\n<pre><code class=\"language-php\">composer require ahmadawais\/sendy-php-api<\/code><\/pre>\n<h4 id=\"step-0-require-the-wrapper\">Step 0. Require the wrapper<a href=\"#step-0-require-the-wrapper\" class=\"heading-link\">#<\/a><\/h4>\n<pre><code class=\"language-php\">\/\/ New way using PSR4 Standard autoloader. Recommended\nrequire_once . '\/vendor\/autoload.php';\n\n\/\/ Old way of requiring all files manually. Not recommended.\nrequire_once( 'API.php' );<\/code><\/pre>\n<h4 id=\"step-1-configure-it\">Step 1. Configure it<a href=\"#step-1-configure-it\" class=\"heading-link\">#<\/a><\/h4>\n<pre><code class=\"language-php\">\/\/ 2. Configuration.\n$config = [\n    'sendyUrl' =&gt; 'https:\/\/send_installation_url.com', \/\/ Your Sendy installation URL (without trailing slash).\n    'apiKey'   =&gt; 'XXXXXXXXXXXXXXXX', \/\/ Your API key. Available in Sendy Settings.\n    'listId'   =&gt; 'XXXXXXXXXXXXXXXX',\n];<\/code><\/pre>\n<h4 id=\"step-2-init\">Step 2. Init<a href=\"#step-2-init\" class=\"heading-link\">#<\/a><\/h4>\n<pre><code class=\"language-php\">use AhmadAwais\\Sendy\\API as Sendy;\n\n$sendy = new Sendy( $config );<\/code><\/pre>\n<h2 id=\"api-key-methods\">API KEY METHODS<a href=\"#api-key-methods\" class=\"heading-link\">#<\/a><\/h2>\n<ol>\n<li>Method: <code>subscribe()<\/code>.<\/li>\n<li>Method: <code>unsubscribe()<\/code>.<\/li>\n<li>Method: <code>subStatus()<\/code>.<\/li>\n<li>Method: <code>delete()<\/code>.<\/li>\n<li>Method: <code>subCount()<\/code>.<\/li>\n<li>Method: <code>campaign()<\/code>.<\/li>\n<\/ol>\n<h3 id=\"method-1-subscribe\">Method #1: Subscribe<a href=\"#method-1-subscribe\" class=\"heading-link\">#<\/a><\/h3>\n<pre><code class=\"language-php\">\/\/ Method #1: Subscribe.\n$responseArray = $sendy-&gt;subscribe(\n    [\n        'email'     =&gt; 'your@email.com', \/\/ This is the only field required by sendy.\n        'name'      =&gt; 'Name', \/\/ User name (optional).\n        'custom'    =&gt; 'Field Value', \/\/ You can custom fields as well (optional).\n        'country'   =&gt; 'US', \/\/ User 2 letter country code (optional).\n        'ipaddress' =&gt; 'XX.XX.XX.XXX', \/\/ User IP address (optional).\n        'referrer'  =&gt; 'https:\/\/AhmadAwais.com\/', \/\/ URL where the user signed up from (optional).\n        'gdpr'      =&gt; true, \/\/ GDPR compliant? Set this to \"true\" (optional).\n    ]\n);<\/code><\/pre>\n<h3 id=\"method-2-unsubscribe\">Method #2: Unsubscribe<a href=\"#method-2-unsubscribe\" class=\"heading-link\">#<\/a><\/h3>\n<pre><code class=\"language-php\">$responseArray = $sendy-&gt;unsubscribe( 'your@email.com' );<\/code><\/pre>\n<h3 id=\"method-3-subscriber-status\">Method #3: Subscriber Status<a href=\"#method-3-subscriber-status\" class=\"heading-link\">#<\/a><\/h3>\n<pre><code class=\"language-php\">$responseArray = $sendy-&gt;subStatus( 'your@email.com' );\n<\/code><\/pre>\n<h3 id=\"method-4-delete-subscriber\">Method #4: Delete Subscriber<a href=\"#method-4-delete-subscriber\" class=\"heading-link\">#<\/a><\/h3>\n<pre><code class=\"language-php\">$responseArray = $sendy-&gt;delete( 'your@email.com' );\n<\/code><\/pre>\n<h3 id=\"method-5-subscriber-count-of-a-list\">Method #5: Subscriber Count of a list<a href=\"#method-5-subscriber-count-of-a-list\" class=\"heading-link\">#<\/a><\/h3>\n<pre><code class=\"language-php\">$responseArray = $sendy-&gt;subCount();<\/code><\/pre>\n<h3 id=\"method-6-campaign-draft-and-or-send-as-well\">Method #6: Campaign \u2014 Draft And\/Or Send as well<a href=\"#method-6-campaign-draft-and-or-send-as-well\" class=\"heading-link\">#<\/a><\/h3>\n<pre><code class=\"language-php\">\/\/ Method #6: Campaign \u2014 Draft And\/Or Send as well.\n$responseArray = $sendy-&gt;campaign(\n    array(\n        'from_name'            =&gt; 'Your Name',\n        'from_email'           =&gt; 'your@email.com',\n        'reply_to'             =&gt; 'your@email.com',\n        'title'                =&gt; 'Title', \/\/ the title of your campaign.\n        'subject'              =&gt; 'Your Subject',\n        'plain_text'           =&gt; 'An Amazing campaign', \/\/ Optional.\n        'html_text'            =&gt; '&lt;h1&gt;Amazing campaign&lt;\/h1&gt;',\n        'brand_id'             =&gt; 1, \/\/ Required only if you are creating a 'Draft' campaign. That is `send_campaign` set to 0.\n        'send_campaign'        =&gt; 0, \/\/ SET: Draft = 0 and Send = 1 for the campaign.\n        \/\/ Required only if you set send_campaign to 1 and no `segment_ids` are passed in.. List IDs should be single or comma-separated.\n        'list_ids'             =&gt; 'XXXXXXXX, XXXXXXXX',\n        \/\/ Required only if you set send_campaign to 1 and no `list_ids` are passed in. Segment IDs should be single or comma-separated.\n        'segment_ids'          =&gt; '1',\n        \/\/ Lists to exclude. List IDs should be single or comma-separated. (optional).\n        'exclude_list_ids'     =&gt; '',\n        \/\/ Segments to exclude. Segment IDs should be single or comma-separated. (optional).\n        'exclude_segments_ids' =&gt; '',\n        'query_string'         =&gt; 'XXXXXXXX', \/\/ Eg. Google Analytics tags.\n    )\n);<\/code><\/pre>\n<h3 id=\"method-7-set-list-id\">Method #7: Set List ID<a href=\"#method-7-set-list-id\" class=\"heading-link\">#<\/a><\/h3>\n<pre><code class=\"language-php\">\/\/ Method #7: Change the `XXXXXXX` you are referring to at any point.\n$sendy-&gt;setListId( 'XXXXXXX' );<\/code><\/pre>\n<h3 id=\"method-8-get-list-id\">Method #8: Get List ID<a href=\"#method-8-get-list-id\" class=\"heading-link\">#<\/a><\/h3>\n<pre><code class=\"language-php\">\/\/ Method #7: Get the `XXXXXXX` you are referring to at any point.\n$sendy-&gt;getListId();<\/code><\/pre>\n<h2 id=\"response\">Response<a href=\"#response\" class=\"heading-link\">#<\/a><\/h2>\n<p>The response of this PHP wrapper is custom-built. At the moment, it always returns a PHP Array. This array has the <code>status<\/code> of your action and an appropriate <code>message<\/code> in the response.<\/p>\n<ul>\n<li><code>status<\/code> is either <code>true<\/code> or <code>false<\/code>.<\/li>\n<li><code>message<\/code> is based on the type of action being performed<\/li>\n<\/ul>\n<pre><code class=\"language-php\">    \/\/ E.g. SUCCESS response.\n    [\n        'status'  =&gt; true,\n        'message' =&gt; 'Already Subscribed'\n    ];\n\n    \/\/ E.g. FAIL response.\n    [\n        'status'  =&gt; false,\n        'message' =&gt; 'Some fields are missing.'\n    ];<\/code><\/pre>\n<p><\/p>\n<p><a href=\"changelog.md\"><img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/ahmadawais\/stuff\/master\/images\/git\/log.png\" alt=\"\ud83d\udcdd\" \/><\/a><\/p>\n<h2 id=\"changelog\">Changelog<a href=\"#changelog\" class=\"heading-link\">#<\/a><\/h2>\n<p><a href=\"changelog.md\">\u276f Read the changelog here \u2192<\/a><\/p>\n<p><\/p>\n<p><small><strong>KEY<\/strong>: <code>\ud83d\udce6 NEW<\/code>, <code>\ud83d\udc4c IMPROVE<\/code>, <code>\ud83d\udc1b FIX<\/code>, <code>\ud83d\udcd6 DOC<\/code>, <code>\ud83d\ude80 RELEASE<\/code>, and <code>\u2705 TEST<\/code><\/p>\n<blockquote>\n<p><em>I use <a href=\"https:\/\/github.com\/ahmadawais\/Emoji-Log\">Emoji-log<\/a>, you should try it and simplify your git commits.<\/em><\/p>\n<\/blockquote>\n<p><\/small><\/p>\n<p><\/p>\n<p><a href=\".\/..\/..\/\"><img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/ahmadawais\/stuff\/master\/images\/git\/license.png\" alt=\"\ud83d\udcc3\" \/><\/a><\/p>\n<h2 id=\"license-conduct\">License &amp; Conduct<a href=\"#license-conduct\" class=\"heading-link\">#<\/a><\/h2>\n<ul>\n<li>MIT \u00a9 <a href=\"https:\/\/twitter.com\/MrAhmadAwais\/\">Ahmad Awais<\/a><\/li>\n<li><a href=\"code-of-conduct.md\">Code of Conduct<\/a><\/li>\n<li>Props to Jacob Bennett for his initial work on the lib.<\/li>\n<li>Requires at least PHP 5.3.0 (otherwise remove the namespaces).<\/li>\n<\/ul>\n<p><\/p>\n<p><a href=\".\/..\/..\/\"><img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/ahmadawais\/stuff\/master\/images\/git\/connect.png\" alt=\"\ud83d\ude4c\" \/><\/a><\/p>\n<h2 id=\"connect\">Connect<a href=\"#connect\" class=\"heading-link\">#<\/a><\/h2>\n<div align=\"left\">\n<p><a href=\"https:\/\/github.com\/ahmadawais\"><img decoding=\"async\" alt=\"GitHub @AhmadAwais\" align=\"center\" src=\"https:\/\/img.shields.io\/badge\/GITHUB-gray.svg?colorB=6cc644&#038;style=flat\" \/><\/a>&nbsp;<small><strong>(follow)<\/strong> To stay up to date on free &#038; open-source software<\/small><\/p>\n<p><a href=\"https:\/\/twitter.com\/MrAhmadAwais\/\"><img decoding=\"async\" alt=\"Twitter @MrAhmadAwais\" align=\"center\" src=\"https:\/\/img.shields.io\/badge\/TWITTER-gray.svg?colorB=1da1f2&#038;style=flat\" \/><\/a>&nbsp;<small><strong>(follow)<\/strong> To get #OneDevMinute daily hot tips &#038; trolls<\/small><\/p>\n<p><a href=\"https:\/\/www.youtube.com\/AhmadAwais\"><img decoding=\"async\" alt=\"YouTube AhmadAwais\" align=\"center\" src=\"https:\/\/img.shields.io\/badge\/YOUTUBE-gray.svg?colorB=ff0000&#038;style=flat\" \/><\/a>&nbsp;<small><strong>(subscribe)<\/strong> To tech talks &#038; #OneDevMinute videos<\/small><\/p>\n<p><a href=\"https:\/\/AhmadAwais.com\/\"><img decoding=\"async\" alt=\"Blog: AhmadAwais.com\" align=\"center\" src=\"https:\/\/img.shields.io\/badge\/MY%20BLOG-gray.svg?colorB=4D2AFF&#038;style=flat\" \/><\/a>&nbsp;<small><strong>(read)<\/strong> In-depth &#038; long form technical articles<\/small><\/p>\n<p><a href=\"https:\/\/www.linkedin.com\/in\/MrAhmadAwais\/\"><img decoding=\"async\" alt=\"LinkedIn @MrAhmadAwais\" align=\"center\" src=\"https:\/\/img.shields.io\/badge\/LINKEDIN-gray.svg?colorB=0077b5&#038;style=flat\" \/><\/a>&nbsp;<small><strong>(connect)<\/strong> On the LinkedIn profile y&#8217;all<\/small><\/p>\n<\/div>\n<p><\/p>\n<p><a href=\".\/..\/..\/\"><img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/ahmadawais\/stuff\/master\/images\/git\/sponsor.png\" alt=\"\ud83d\udc4c\" \/><\/a><\/p>\n<h2 id=\"sponsor\">Sponsor<a href=\"#sponsor\" class=\"heading-link\">#<\/a><\/h2>\n<p>Me (<a href=\"https:\/\/twitter.com\/mrahmadawais\/\">Ahmad Awais<\/a>) and my incredible wife (<a href=\"https:\/\/twitter.com\/MaedahBatool\/\">Maedah Batool<\/a>) are two engineers who fell in love with open source and then with each other. You can read more <a href=\"https:\/\/ahmadawais.com\/about\">about me here<\/a>. If you or your company use any of my projects or like what I\u2019m doing then consider backing me. I&#8217;m in this for the long run. An open-source developer advocate.<\/p>\n<p><a href=\"https:\/\/twitter.com\/mrahmadawais\/\"><img decoding=\"async\" src=\"https:\/\/img.shields.io\/twitter\/follow\/mrahmadawais.svg?style=social&amp;label=Follow%20@MrAhmadAwais\" alt=\"Ahmad on Twitter\" \/><\/a><\/p>\n<p><a href=\"https:\/\/github.com\/AhmadAwais\/sponsor\"><img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/ahmadawais\/stuff\/master\/sponsor\/sponsor.jpg\" alt=\"Ahmad on Twitter\" \/><\/a><\/p>\n<p>This also happens to be my first composer package, so yay! \ud83c\udf89<\/p>\n<p>Feedback is more than welcomed at <a href=\"https:\/\/github.com\/ahmadawais\/Sendy-PHP-API\">GitHub<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently started using Sendy.co (aff) to send emails. I was having trouble finding a good API wrapper for it. Spent more than five hours searching for one and ended up building one myself. I hope it helps.<\/p>\n","protected":false},"author":2,"featured_media":2046,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"webmentions_disabled_pings":false,"webmentions_disabled":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[136],"tags":[],"class_list":["post-2041","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-business"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Open Sourcing My Sendy PHP API Wrapper<\/title>\n<meta name=\"description\" content=\"I recently started using Sendy.co (aff) to send emails. I was having trouble finding a good API wrapper for it. Spent more than five hours searching for one and ended up building one myself. I hope it helps.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ahmadawais.com\/sendy-php-api-wrapper\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Open Sourcing My Sendy PHP API Wrapper\" \/>\n<meta property=\"og:description\" content=\"I recently started using Sendy.co (aff) to send emails. I was having trouble finding a good API wrapper for it. Spent more than five hours searching for one and ended up building one myself. I hope it helps.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ahmadawais.com\/sendy-php-api-wrapper\/\" \/>\n<meta property=\"og:site_name\" content=\"Ahmad Awais\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/AhmadAwais\" \/>\n<meta property=\"article:author\" content=\"https:\/\/facebook.com\/AhmadAwais\" \/>\n<meta property=\"article:published_time\" content=\"2017-03-20T14:27:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-16T12:47:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ahmadawais.com\/wp-content\/uploads\/2017\/03\/sendy-php-api.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ahmad Awais\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@MrAhmadAwais\" \/>\n<meta name=\"twitter:site\" content=\"@MrAhmadAwais\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ahmad Awais\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/sendy-php-api-wrapper\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/sendy-php-api-wrapper\\\/\"},\"author\":{\"name\":\"Ahmad Awais\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/#\\\/schema\\\/person\\\/1d1b9504182dca2315cf039fb4ebb85b\"},\"headline\":\"Open Sourcing My Sendy PHP API Wrapper\",\"datePublished\":\"2017-03-20T14:27:33+00:00\",\"dateModified\":\"2023-08-16T12:47:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/sendy-php-api-wrapper\\\/\"},\"wordCount\":92,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/#\\\/schema\\\/person\\\/1d1b9504182dca2315cf039fb4ebb85b\"},\"image\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/sendy-php-api-wrapper\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/sendy-php-api.png\",\"articleSection\":[\"Business\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/ahmadawais.com\\\/sendy-php-api-wrapper\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/sendy-php-api-wrapper\\\/\",\"url\":\"https:\\\/\\\/ahmadawais.com\\\/sendy-php-api-wrapper\\\/\",\"name\":\"Open Sourcing My Sendy PHP API Wrapper\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/sendy-php-api-wrapper\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/sendy-php-api-wrapper\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/sendy-php-api.png\",\"datePublished\":\"2017-03-20T14:27:33+00:00\",\"dateModified\":\"2023-08-16T12:47:17+00:00\",\"description\":\"I recently started using Sendy.co (aff) to send emails. I was having trouble finding a good API wrapper for it. Spent more than five hours searching for one and ended up building one myself. I hope it helps.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/sendy-php-api-wrapper\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ahmadawais.com\\\/sendy-php-api-wrapper\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/sendy-php-api-wrapper\\\/#primaryimage\",\"url\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/sendy-php-api.png\",\"contentUrl\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/sendy-php-api.png\",\"width\":1920,\"height\":1080,\"caption\":\"? Sendy PHP API Wrapper: Complete API interfacing.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/sendy-php-api-wrapper\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ahmadawais.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Open Sourcing My Sendy PHP API Wrapper\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/#website\",\"url\":\"https:\\\/\\\/ahmadawais.com\\\/\",\"name\":\"Ahmad Awais\",\"description\":\"Founder &amp; CEO of CommandCode.ai f\\\/k\\\/a Langbase | Google Developers Advisory Board (gDAB) founding member\",\"publisher\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/#\\\/schema\\\/person\\\/1d1b9504182dca2315cf039fb4ebb85b\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ahmadawais.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/#\\\/schema\\\/person\\\/1d1b9504182dca2315cf039fb4ebb85b\",\"name\":\"Ahmad Awais\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/Ahmad-Awais-face.jpg\",\"url\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/Ahmad-Awais-face.jpg\",\"contentUrl\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/Ahmad-Awais-face.jpg\",\"width\":2299,\"height\":1705,\"caption\":\"Ahmad Awais\"},\"logo\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/Ahmad-Awais-face.jpg\"},\"description\":\"Founder & CEO of \u2318 Command Code coding agent with taste. Founded Langbase.com, AI cloud to build, deploy, and scale AI agents with tools & memory \u00b7 Creator of Command.new. \\\"Awais is an awesome example for developers\\\" \u2014 Satya Nadella, CEO of Microsoft. NASA Mars Ingenuity Helicopter mission code contributor 8th GitHub Stars Award recipient with 5x GitHub Stars Award (Listed as GitHub's #1 JavaScript trending developer). Google Developers Expert Web DevRel. Ex VP Eng (DevTools & DevRel) Rapid \u00b7 Google Developers Advisory Board (gDAB) founding member \u00b7 AI\\\/ML\\\/DevTools Angel Investor (Replit, Resend, Daytona, Gumroad and you?) \u276f AI\\\/ML Advisory Board San Francisco, DevNetwork. Award-winning Open Source Engineering leader authored hundreds of open-source dev-tools and software libraries used by millions of developers, including Shades of Purple code theme and corona-cli. Linux Foundation (Node.js Committee Lead), OpenAPI Business Governing Board. Taught 108K+ developers via NodeCLI.com and VSCode.pro course. 274 million views, blogging for 24 yrs. \u276f Read more about Ahmad Awais or come say hi on \ud835\udd4f @MrAhmadAwais.\",\"sameAs\":[\"https:\\\/\\\/AhmadAwais.com\\\/\",\"https:\\\/\\\/facebook.com\\\/AhmadAwais\",\"https:\\\/\\\/instagram.com\\\/MrAhmadAwais\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/MrAhmadAwais\\\/\",\"https:\\\/\\\/x.com\\\/MrAhmadAwais\",\"https:\\\/\\\/youtube.com\\\/AhmadAwais\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Open Sourcing My Sendy PHP API Wrapper","description":"I recently started using Sendy.co (aff) to send emails. I was having trouble finding a good API wrapper for it. Spent more than five hours searching for one and ended up building one myself. I hope it helps.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ahmadawais.com\/sendy-php-api-wrapper\/","og_locale":"en_US","og_type":"article","og_title":"Open Sourcing My Sendy PHP API Wrapper","og_description":"I recently started using Sendy.co (aff) to send emails. I was having trouble finding a good API wrapper for it. Spent more than five hours searching for one and ended up building one myself. I hope it helps.","og_url":"https:\/\/ahmadawais.com\/sendy-php-api-wrapper\/","og_site_name":"Ahmad Awais","article_publisher":"https:\/\/facebook.com\/AhmadAwais","article_author":"https:\/\/facebook.com\/AhmadAwais","article_published_time":"2017-03-20T14:27:33+00:00","article_modified_time":"2023-08-16T12:47:17+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2017\/03\/sendy-php-api.png","type":"image\/png"}],"author":"Ahmad Awais","twitter_card":"summary_large_image","twitter_creator":"@MrAhmadAwais","twitter_site":"@MrAhmadAwais","twitter_misc":{"Written by":"Ahmad Awais","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ahmadawais.com\/sendy-php-api-wrapper\/#article","isPartOf":{"@id":"https:\/\/ahmadawais.com\/sendy-php-api-wrapper\/"},"author":{"name":"Ahmad Awais","@id":"https:\/\/ahmadawais.com\/#\/schema\/person\/1d1b9504182dca2315cf039fb4ebb85b"},"headline":"Open Sourcing My Sendy PHP API Wrapper","datePublished":"2017-03-20T14:27:33+00:00","dateModified":"2023-08-16T12:47:17+00:00","mainEntityOfPage":{"@id":"https:\/\/ahmadawais.com\/sendy-php-api-wrapper\/"},"wordCount":92,"commentCount":3,"publisher":{"@id":"https:\/\/ahmadawais.com\/#\/schema\/person\/1d1b9504182dca2315cf039fb4ebb85b"},"image":{"@id":"https:\/\/ahmadawais.com\/sendy-php-api-wrapper\/#primaryimage"},"thumbnailUrl":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2017\/03\/sendy-php-api.png","articleSection":["Business"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ahmadawais.com\/sendy-php-api-wrapper\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ahmadawais.com\/sendy-php-api-wrapper\/","url":"https:\/\/ahmadawais.com\/sendy-php-api-wrapper\/","name":"Open Sourcing My Sendy PHP API Wrapper","isPartOf":{"@id":"https:\/\/ahmadawais.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ahmadawais.com\/sendy-php-api-wrapper\/#primaryimage"},"image":{"@id":"https:\/\/ahmadawais.com\/sendy-php-api-wrapper\/#primaryimage"},"thumbnailUrl":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2017\/03\/sendy-php-api.png","datePublished":"2017-03-20T14:27:33+00:00","dateModified":"2023-08-16T12:47:17+00:00","description":"I recently started using Sendy.co (aff) to send emails. I was having trouble finding a good API wrapper for it. Spent more than five hours searching for one and ended up building one myself. I hope it helps.","breadcrumb":{"@id":"https:\/\/ahmadawais.com\/sendy-php-api-wrapper\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ahmadawais.com\/sendy-php-api-wrapper\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ahmadawais.com\/sendy-php-api-wrapper\/#primaryimage","url":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2017\/03\/sendy-php-api.png","contentUrl":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2017\/03\/sendy-php-api.png","width":1920,"height":1080,"caption":"? Sendy PHP API Wrapper: Complete API interfacing."},{"@type":"BreadcrumbList","@id":"https:\/\/ahmadawais.com\/sendy-php-api-wrapper\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ahmadawais.com\/"},{"@type":"ListItem","position":2,"name":"Open Sourcing My Sendy PHP API Wrapper"}]},{"@type":"WebSite","@id":"https:\/\/ahmadawais.com\/#website","url":"https:\/\/ahmadawais.com\/","name":"Ahmad Awais","description":"Founder &amp; CEO of CommandCode.ai f\/k\/a Langbase | Google Developers Advisory Board (gDAB) founding member","publisher":{"@id":"https:\/\/ahmadawais.com\/#\/schema\/person\/1d1b9504182dca2315cf039fb4ebb85b"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ahmadawais.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/ahmadawais.com\/#\/schema\/person\/1d1b9504182dca2315cf039fb4ebb85b","name":"Ahmad Awais","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/06\/Ahmad-Awais-face.jpg","url":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/06\/Ahmad-Awais-face.jpg","contentUrl":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/06\/Ahmad-Awais-face.jpg","width":2299,"height":1705,"caption":"Ahmad Awais"},"logo":{"@id":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/06\/Ahmad-Awais-face.jpg"},"description":"Founder & CEO of \u2318 Command Code coding agent with taste. Founded Langbase.com, AI cloud to build, deploy, and scale AI agents with tools & memory \u00b7 Creator of Command.new. \"Awais is an awesome example for developers\" \u2014 Satya Nadella, CEO of Microsoft. NASA Mars Ingenuity Helicopter mission code contributor 8th GitHub Stars Award recipient with 5x GitHub Stars Award (Listed as GitHub's #1 JavaScript trending developer). Google Developers Expert Web DevRel. Ex VP Eng (DevTools & DevRel) Rapid \u00b7 Google Developers Advisory Board (gDAB) founding member \u00b7 AI\/ML\/DevTools Angel Investor (Replit, Resend, Daytona, Gumroad and you?) \u276f AI\/ML Advisory Board San Francisco, DevNetwork. Award-winning Open Source Engineering leader authored hundreds of open-source dev-tools and software libraries used by millions of developers, including Shades of Purple code theme and corona-cli. Linux Foundation (Node.js Committee Lead), OpenAPI Business Governing Board. Taught 108K+ developers via NodeCLI.com and VSCode.pro course. 274 million views, blogging for 24 yrs. \u276f Read more about Ahmad Awais or come say hi on \ud835\udd4f @MrAhmadAwais.","sameAs":["https:\/\/AhmadAwais.com\/","https:\/\/facebook.com\/AhmadAwais","https:\/\/instagram.com\/MrAhmadAwais\/","https:\/\/www.linkedin.com\/in\/MrAhmadAwais\/","https:\/\/x.com\/MrAhmadAwais","https:\/\/youtube.com\/AhmadAwais"]}]}},"jetpack_featured_media_url":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2017\/03\/sendy-php-api.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/posts\/2041","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/comments?post=2041"}],"version-history":[{"count":2,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/posts\/2041\/revisions"}],"predecessor-version":[{"id":7975,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/posts\/2041\/revisions\/7975"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/media\/2046"}],"wp:attachment":[{"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/media?parent=2041"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/categories?post=2041"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/tags?post=2041"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}